initial server setup
This commit is contained in:
parent
fc2914ed44
commit
29f7a0ef84
22
index.js
22
index.js
@ -0,0 +1,22 @@
|
||||
const fs = require('fs');
|
||||
const http = require('http');
|
||||
const express = require('express');
|
||||
|
||||
const app = express();
|
||||
const clientPath = __dirname+'/../../Websites/TerminalHomepage';
|
||||
app.use(express.static(clientPath));
|
||||
const server = http.createServer(app);
|
||||
|
||||
app.post('/message')
|
||||
|
||||
server.on('error', err => {
|
||||
console.error('Internal server error:', err);
|
||||
});
|
||||
|
||||
server.on('close', () => {
|
||||
console.log("Shutting down ...");
|
||||
});
|
||||
|
||||
server.listen(3000, () => {
|
||||
console.log("Server running ...")
|
||||
});
|
Loading…
Reference in New Issue
Block a user