We can run our web application on custom port which can be provided by
the developer, here we can check that that the provided port is working on not.
Pre-requiste Installation
NodeJS
1. Install npm install express
2. Create server.js file
var
express = require('express');
var
app = express();
app.use(express.static(__dirname
+ '/www'));
app.listen('3000');
console.log('working
on 3000');
3. In parallel root folder, create www folder
4. Put index.html or
application folder inside www folder, refer below image:
5. Start server by typing node server.js in command prompt.
6. open
localhost:3000
and index.html code will execute.
Happy Coding :)