first example nodejs

main
Gerardo Marx 11 hours ago
commit 3306723c17

@ -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 Marx!</h1>');
});
server.listen(3333, () => {
console.log('listen on port 3333');
});

@ -0,0 +1,15 @@
{
"name": "nodejs-first-example",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.22.3"
}
}
Loading…
Cancel
Save