A Microservice Server
a simple, express based server for creating microservices.
Installation
- Clone this repository
git clone
- Install all the dependencies
yarn
- Start the server
yarn start
- In another window execute the test client
node client.js
- 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.