developer portal

Documentation

Building edge microservices

This page outlines how to build your own edge microservices for edgeSDK.

Prerequisites

First, gather the tools that you will need:

  1. Node.js
  2. edgeSDK
  3. edge microservice source code

Building from starter microservice

Note: The following steps only applicable to edge microservice follow starter microservice as a template. To build mimik open source edge microservice (e.g. mBeam), please scroll down for guide to build API-first driven edge microservice.

  1. Install microservice dependencies, you can simply use this command:
npm i
  1. Now, simply run the following command to minimize the build:
npm run build
  1. Next, simply run the following command and your image file will be packed under the folder that you specify under config/default.yml
npm run package

Note: After you have successfully built your edge microservice, it is time to learn how to deploy.

Building from API-first driven microservices

  1. Install microservice dependencies, you can simply use this command:
npm i
  1. Run the following command to generate Swagger API interface:
npm run prebuild
  1. Now, simply run the following command to minimize the build:
npm run build
  1. Next, simply run the following command and your image file will be packed under the folder that you specify under config/default.yml
npm run package

Note: After you have successfully built your edge microservice, it is time to learn how to deploy.

Need more help?

Feel free to contact us on stack overflow or send us a question via our support page if you have any questions.

Was this page helpful?