xsshunter/server.js

25 lines
550 B
JavaScript
Raw Normal View History

2021-05-31 19:06:40 +00:00
'use strict';
const get_app_server = require('./app.js');
const database = require('./database.js');
const database_init = database.database_init;
if(!process.env.SSL_CONTACT_EMAIL) {
console.error(`[ERROR] The environment variable 'SSL_CONTACT_EMAIL' is not set, please set it.`);
process.exit();
}
(async () => {
// Ensure database is initialized.
await database_init();
const app = await get_app_server();
2023-01-25 16:54:53 +00:00
const port = process.env.PORT;
app.listen(port, () => {
console.log(`XSS Hunter listening on port ${port}`)
});
2021-05-31 19:06:40 +00:00
})();