@webstronauts/mercury
v0.10.0Installation
This package is distributed via NPM which is bundled with Node and should be installed as one of your project's dependencies
:
npm install --save @webstronauts/mercury
Usage
Your application can be as simple as:
// app.js
module.exports = function(app, options, next) {
app.get('/', function(req, res) {
res.send({hello: 'world'})
})
next()
}
If you are using Node 8+, you can use async
functions too:
// async-await-plugin.js
module.exports = async function(app, options) {
app.get('/', async function(req, res) {
res.send({hello: 'world'})
})
}
Then you can start your application with;
mercury start plugin.js
Inspiration
We're not re-inventing the wheel here. The inspiration for this framework comes from a couple of other awesome projects;
Author(s)
Robin van der Vleuten (@robinvdvleuten) - The Webstronauts
npm i @webstronauts/mercury
Metadata
- MIT
- >=8.9.0
- Robin van der Vleuten
- released 9/28/2018