Skip to content

MostlyJS/mostly-poplarjs-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MostlyJS Poplarjs Handler

Build Status

This module provides an express middleware as a RESTful gateway to call microservice writing with mostly-poplarjs.

Usage

Installation

npm install mostly-poplarjs-rest

Quick Example

import express from 'express';
import bodyParser from 'body-parser';
import nats from 'nats';
import mostly from 'mostly-node';
import poplar from 'mostly-poplarjs-rest';

const trans = new mostly(nats.connect()
const app = express()
  .use(bodyParser.json())
  .use(bodyParser.urlencoded({ extended: true }));

trans.ready(() => {
  app.use(poplar(app, trans, '/api'));
  app.listen(process.env.PORT || 3001);
});

License

MIT

About

MostlyJS microservice RESTful handler for poplarjs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published