swint-server
v1.3.2
Published
Swint web server based on expressJS
Downloads
224
Readme
swint-server
Swint web server based on expressJS
Warning: This is not the final draft yet, so do not use this until its official version is launched
Installation
$ npm install --save swint-server
Usage
var server = new swintServer({
http: {
mode: 'redirect'
},
https: {
mode: 'enabled'
},
middleware: {
loader: [{
dir: path.join(__dirname, '../test_case/test_middleware')
}],
pre: [
'pre-middleware1', // for the middlewares don't need options or want to run with default ones
{
name: 'pre-middleware2', // for the middlewares need options
options: {
string: 'middlewareOptionString'
}
}
],
post: [
'post-middleware'
]
},
static: [
{
url: 'static',
path: path.join(__dirname, 'static')
}
]
}, function() {
done();
});