@webstronauts/mercury

0.10.0 • Public • Published

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

/@webstronauts/mercury/

    Package Sidebar

    Install

    npm i @webstronauts/mercury

    Weekly Downloads

    0

    Version

    0.10.0

    License

    MIT

    Unpacked Size

    9.6 kB

    Total Files

    11

    Last publish

    Collaborators

    • robinvdvleuten