A Felid plugin for sending static files.
npm install felid-serve
or
yarn add felid-serve
const Felid = require('felid')
const serve = require('felid-serve')
const app = new Felid()
app.plugin(serve, options)
app.get('/', (req, res) => {
res.serve('/static/index.html')
})
- decorator Object: Customize the decorator names. Default is:
{
serve: 'serve'
}
For more options, please check send.
Some has default values:
- root: default to the directory where node runs.
- response.serve(path: String, options: Object): Serve the given file. The options passed here will override the plugin options.