We can make a folder just like a web server using nodejs for quick jobs
First we can install connect and expressjs, serve-static with Node.js:
$ npm install connect serve-static
We can make .js file (serve.js) and write the below code in that file:
var connect = require('connect'); var serveStatic = require('serve-static'); connect().use(serveStatic(__dirname)).listen(8080);
Then in cmd, run this file:
$ node server.js
Now we can access the local server in URL:
http://localhost:8080/myfiles.html
And can exit by pressing:
ctrl+c
8,124 total views, 1 views today
September 1, 2015 at 3:57 pm
great put up, very informative. I ponder why the other specialists of this sector don’t understand this.
You should continue your writing. I’m confident, you’ve a great
readers’ base already!