Add basic server
This commit is contained in:
parent
b6edfff2ba
commit
16f989e1ec
14
index.js
Normal file
14
index.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
const http = require('http');
|
||||||
|
|
||||||
|
const hostname = '127.0.0.1';
|
||||||
|
const port = 3000;
|
||||||
|
|
||||||
|
const server = http.createServer((req, res) => {
|
||||||
|
res.statusCode = 200;
|
||||||
|
res.setHeader('Content-Type', 'text/plain');
|
||||||
|
res.end('Hello World');
|
||||||
|
});
|
||||||
|
|
||||||
|
server.listen(port, hostname, () => {
|
||||||
|
console.log(`Server running at http://${hostname}:${port}/`);
|
||||||
|
});
|
15
package.json
Normal file
15
package.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "backend",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Backend for Meeting Planner",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@git.armada.digital:29418/meeting-planner/backend.git"
|
||||||
|
},
|
||||||
|
"author": "rui hildt",
|
||||||
|
"license": "AGPL-3.0-or-later"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user