server
Version:
A modern and powerful server for Node.js
20 lines (18 loc) • 369 B
JavaScript
const modern = require('../../src/modern');
module.exports = {
name: 'static',
options: {
__root: 'public',
public: {
type: String,
inherit: 'public',
env: false
}
},
init: ctx => {
if (!ctx.options.static.public) return;
module.exports.before = [
modern(ctx.express.static(ctx.options.static.public))
];
}
};