initial server setup

This commit is contained in:
Baipyrus 2023-01-16 14:13:04 +01:00
parent fc2914ed44
commit 29f7a0ef84

View File

@ -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 ...")
});