Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

exframe-rest

exzeo-usa1.7kISC3.7.1

Rest framework module

readme

exframe Rest Module

A wrapper around express to provide restful routing for the Harmony Framework.

Features

  • Defaults to port 8080
  • Assumes JSON for the payload
  • Sets HTTP access control headers (CORS)

Use

const app = require('exframe-rest').create(process.env.PORT);

app.post('/test', (req, res) => {
  res.json({'result': 1})
});

Tests

`javascript npm run test