mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 17:59:25 +00:00
Set up expressjs framework
This commit is contained in:
22
app.js
Normal file
22
app.js
Normal 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);
|
||||
896
package-lock.json
generated
896
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,7 @@
|
||||
"homepage": "https://github.com/matt-fidd/stratos#readme",
|
||||
"dependencies": {
|
||||
"bcrypt": "^5.0.1",
|
||||
"express": "^4.17.2",
|
||||
"mysql2": "^2.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user