microservice-server

1.0.0 • Public • Published

A Microservice Server

a simple, express based server for creating microservices.

Test

Installation

  1. Clone this repository
git clone 
  1. Install all the dependencies
yarn
  1. Start the server
yarn start
  1. In another window execute the test client
node client.js
  1. make your own handler.js file

How it works

the server listens for POST calls to /process then it passess the data to your handler function and returns a response to the client.

I use it as a template for mini service servers:

  • html2pdf processing
  • web stats
  • etc..

Example handlers

You can find example handlers in the src/handlers directory

Test

yarn test

Deploying on the server

It contains sample shipit and pm2 config files.

Readme

Keywords

none

Package Sidebar

Install

npm i microservice-server

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

21.3 kB

Total Files

23

Last publish

Collaborators

  • danielzzz