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