First nodejs example

main
commit 077be04f5e

@ -0,0 +1,12 @@
const express = require('express');
const app = express();
const http = require('http');
const server = http.createServer(app);
app.get('/', (req, res) => {
res.send('<h1> Hello Dario!</h1>');
});
server.listen(3333, () => {
console.log('listen on port 3333');
});

@ -0,0 +1,14 @@
{
"name": "nodejs-first-example",
"version": "1.0.0",
"description": "first node js example to see how it works",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.22.3"
}
}
Loading…
Cancel
Save