1.0.0 • Published 5 years ago
ninjahost v1.0.0
ninjahost
Serve directories over HTTP at your favorite Port.
Installation
Install from Command Line:
npm i ninjahostUsage
Make a file myhost.js.
Write below code in the file.
const ninjahost = require('ninjahost'); const { resolve } = require('path'); const dir = resolve(__dirname, 'build'); const port = 6000; // below code serves 'build' directory at port 6000 // dir path must be absolute ninjahost(dir, port); ...If port is not specified, then 1123 will be used as the default port.
Run below command in the command line.
node myhost.jsNow go to the below url in your favorite browser.
http://localhost:6000
Ninja Hacking ;)
1.0.0
5 years ago