bz-filemethod-api
v2.0.5
Published
dynamic server for filemethods in a directories
Downloads
5
Readme
simple https and socket server from files in folders default folder is api
simple usage :
var bzs = require("bz-filemethod-api");
bzs.start(); => start server on port 3008 and searches api folder in root for files or bzs.start(3009); => start server on port 3009
bzs.start(); => restart server if already started (all params are ignored if started once)
advance usage :
bzs.start({ port: optional port number host: optional host name if https is provided will be 0.0.0.0 api: string or array of string or array of objects {prefix:string,name:string,path:string} https: { key: key of ssl certificate cert: cert of ssl certificate } HttpServer:boolean => disable http server if you want socketioServer:boolean => disable http server if you wan },function(){ //use your logic and return following return { haspermission: true, result: { user: {} } } });