Instant Static
A simple API for creating static routes in node JS.
Under the hood, it's using express, and the express.static function to create your routes.
Since that's all the module does, it was easy to keep the API simple!
npm install instant-static --save
const iStat = require('instant-static');
iStat(configObject, callbackFunction);
const iStat = ;;
console.log(info); from above gives the following:
port: 3111 routes: url: '/img' location: '/Users/Adam/Desktop/_temp/tests/img' localOnly: true
That's it!
Calling the function created our route(s) and when complete, information about the route(s) created is/are reported back in the callback function.