diff options
| author | kanadeko <[email protected]> | 2017-01-16 04:37:42 -0300 |
|---|---|---|
| committer | kanadeko <[email protected]> | 2017-01-16 04:37:42 -0300 |
| commit | 7b72c3e560d4671cab3b1bcfaa9dd8543a998862 (patch) | |
| tree | eba16ec853a6d16dc7abff630a8391be373e8a84 /lolisafe.js | |
| parent | Removed error code because is stupid (diff) | |
| download | host.fuwn.me-7b72c3e560d4671cab3b1bcfaa9dd8543a998862.tar.xz host.fuwn.me-7b72c3e560d4671cab3b1bcfaa9dd8543a998862.zip | |
Added generation of random token
Diffstat (limited to 'lolisafe.js')
| -rw-r--r-- | lolisafe.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lolisafe.js b/lolisafe.js index ab3a3c8..082ccef 100644 --- a/lolisafe.js +++ b/lolisafe.js @@ -6,7 +6,7 @@ const db = require('knex')(config.database) const fs = require('fs') const safe = express() -require('./database/db.js')(db) +require('./database/db.js')(db, config) fs.existsSync('./' + config.uploads.folder) || fs.mkdirSync('./' + config.uploads.folder) fs.existsSync('./' + config.logsFolder) || fs.mkdirSync('./' + config.logsFolder) @@ -32,7 +32,4 @@ safe.use(function (err, req, res, next) { res.status(500).end() }) -safe.listen(config.port, () => console.log(`loli-safe started on port ${config.port}`)) - -if(config.TOKEN !== '') console.log('Use the following token as the \'auth\' header in your requests to the API: ' + config.TOKEN) -else console.log('Running lolisafe in public mode. No token required.')
\ No newline at end of file +safe.listen(config.port, () => console.log(`loli-safe started on port ${config.port}`))
\ No newline at end of file |