0.10.0 • Published 6 years ago

@webstronauts/mercury v0.10.0

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

mercury ⚗️

An opinionated framework built on top of Express and avvio.

License Version Build Status Prettier

Installation

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