refactor(registrar): add initializers
This commit is contained in:
parent
c1b8e37e70
commit
ab86f0a3e1
1 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
const fs = require('fs');
|
||||
|
||||
//initializers
|
||||
if (!fs.existsSync('fediverse_auth.json')) fs.copyFileSync('fediverse_auth.example.json', 'fediverse_auth.json');
|
||||
if (!fs.existsSync('matrix_auth.json')) fs.copyFileSync('matrix_auth.example.json', 'matrix_auth.json');
|
||||
if (!fs.existsSync('config.js')) fs.copyFileSync('config.example.js', 'config.js');
|
||||
if (!fs.existsSync('timeline.json')) fs.writeFileSync('timeline.json', 0);
|
||||
if (!fs.existsSync('notification.json')) fs.writeFileSync('notification.json', 0);
|
||||
|
||||
module.exports = {
|
||||
config: require('./config.js'),
|
||||
fediverse_auth: require('./fediverse_auth.json'),
|
||||
|
|
Loading…
Reference in a new issue