totojs

0.0.6 • Public • Published

toto.js

( 0 + 0 )

Installation:

Download the npm package anywhere:

cd /srv/http/<my-server>
$ npm i totojs

Dry-run it with:

$ node node_modules/totojs/main.js

The default server should now be listening on port 8090 of your machine.

Configuration:

Create a launch file:

// toto.js
 
let toto = require('totojs');
 
let config = {
    port: 80,   
    index: 'index.html',
    dirs: [
        {
            path : '<path-to-my-dir>',
            href : '<url-to-my-dir>'
        },{
            path : '<path-to-other-dir>',
            href : '<url-to-other-dir>'
        }
    ],
};
 
toto.server(config);

and run it with:

$ sudo node toto.js

Troubleshooting:

The default HTTP port is 80 and root-reserved, so root needs a working node installation.

If you are unsure of the superuser's node installation, try listening
on available ports above 1024 as your own user)

Readme

Keywords

none

Package Sidebar

Install

npm i totojs

Weekly Downloads

3

Version

0.0.6

License

GPLv2

Unpacked Size

58.3 kB

Total Files

30

Last publish

Collaborators

  • opeltre