How do you create a hello world Node JS application
npm init
npm install express --save
var express = require('express');
var app = express();app.get('/', function (req, res) {
res.send('Hello World!');
});app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});
node app.js
Comments
Post a Comment