0.0.6 • Published 6 years ago

totojs v0.0.6

Weekly downloads
2
License
GPLv2
Repository
-
Last release
6 years ago

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)

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago