cgi-gin
Connect middleware for a folder of javascript modules
usage
Mount a whole folder of javascript modules onto '/scripts':
var gin = ;var express = ;var http = ; var app = ;var server = http; app
A single module (test1.js) in the folder:
module{ // options are the same for each module return { // module code here }}
This script will be run on these urls:
- /scripts/test1
- /scripts/test1.js
installation
$ npm install cgi-gin
methods
gin(folder, options)
return a connect middleware that loads all .js files in folder and passes options to the module expecting a middleware function back.
options are the same for each module
license
MIT