Kelvin - A mini file system web server
A mini file system web server, you can call him Kelvin.
/index.js
, requirebabel-core
/lib/build.js
, transfer frombabel-core
, compatiable withnode: ~v0.12.x
Install
Install from npm,
npm install mini-fileSystem-WebServer;node node_modules/mini-fileSystem-WebServer/lib/index.js; # or run with babel-node babel-node node_modules/mini-fileSystem-WebServer/index.js;
Install from github:
git clone https://github.com/barretlee/mini-fileSystem-WebServer.git;cd mini-fileSystem-WebServer;npm run node; # or run with babel-node npm run babel;
Usage
Command Line Mode
with babel-node,
$ babel-node index RELATIVE_PATH_OR_IGNORE
Of course, you can also use the ES5 compatiable mode via lib/build
in this way whitout babel installed:
$ node index RELATIVE_PATH_OR_IGNORE
Use in File
;;
or, es5 compatiable mode:
var start = ;;
There are two params:
base
, the relative path, not required.favicon
, you knewn it, default is my avatar, not required.
and logs printed:
$ babel-node index ..Listen at: http://localhost:8800Visit: /Users/barret/work/testVisit: /Users/barret/work/test/bug.jsVisit: /Users/barret/work/test/coVisit: /Users/barret/work/test/co/testVisit: /Users/barret/work/test/co/delVisit: /Users/barret/work/test/co/del/b
Develop
cd mini-fileSystem-WebServer;npm install;npm run babel;
edit index.js
and build to lib/index.js
:
npm run build;
LICENSE
MIT License.