1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 16:19:26 +00:00

Set up expressjs framework

This commit is contained in:
2022-01-23 22:57:48 +00:00
parent e6813851bf
commit 1212358e92
3 changed files with 914 additions and 5 deletions

22
app.js Normal file
View File

@@ -0,0 +1,22 @@
'use strict';
// Import required modules
const express = require('express');
// Import user defined modules
const importJSON = require('./lib/importJSON');
async function main() {
// Import server config file
const serverOptions = importJSON('server');
// Initialise up express app
const app = express();
// Start the server
app.listen(serverOptions.port, () => {
console.log(`Server listening on :${serverOptions.port}`);
});
}
main().catch(console.error);