Nodejs: web server sederhana

From OnnoWiki
Revision as of 05:16, 6 May 2014 by Onnowpurbo (talk | contribs) (New page: Sumber: http://stackoverflow.com/questions/6084360/node-js-as-a-simple-web-server ==Web Server Amat Sangat Sederhana== Simplest nodejs server is just .... $ npm install http-server -g ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Sumber: http://stackoverflow.com/questions/6084360/node-js-as-a-simple-web-server

Web Server Amat Sangat Sederhana

Simplest nodejs server is just ....

$ npm install http-server -g

Now you can run a server via

$ cd MyApp
$ http-server

OR

$ http-server -o --cors - which opens your web browser and enables CORS requests.

For more options, check out https://github.com/nodeapps/http-server OR run:

$ http-server --help



Referensi