Opinionated framework to create Exosphere micro-services in Node.js


License
ISC
Install
npm install exoservice@0.27.0

Documentation

JavaScript Exoservice Framework

opinionated framework for creating Exosphere lambda services in Node.JS

Circle CI Dependency Status devDependency Status

Installation

npm install -g exoservice-js

Creating a micro-service

Let's create the simplest possible microservice: when receiving the message "ping", it replies with the message "pong".

  1. create an empty service scaffold

    • yo exoservice ping
  2. start your server: SERVICE_NAME=pinger EXORELAY_PORT=3000 EXOCOM_PORT=3100 exo-js

    • SERVICE_NAME is as what your service should identify to Exosphere
    • EXORELAY_PORT is the port at which your service listens to Exosphere messages
    • EXOCOM_PORT is the port at which your local ExoCom instance runs

Testing

Test a running service manually:

$ curl -d '{"id": "123" }' -H "Content-Type: application/json" -i http://localhost:3000/run/hello-world

Development

See your developer guidelines