Skip to content

prateekmimik/starter-microservice

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

starter-microservice


This is a starter microservice that allows you to start developing an edge microservice.

How to use it?


If this is your first time developing an edge microservice, please follow the developer documentation quick start guide.

Before you use it, you must build the microservice and later deploy it to mim OE.

Build Process


The build script default.yml is specified under config directory.

  1. Install dependencies: npm install
  2. Run the build script: npm run build
  3. Package to container: npm run package

Deployment


For mobile application development, deployment is programmatically by Android or iOS Client Libraries, learn more about it:

For microservice development, things you will need:

  • mim OE running on the deployment targeted device.
  • Obtained edge Access Token and associated the device from mimik-edge-cli that is installed:npm install -g @mimik/mimik-edge-cli. For more information, go here.
  • Run the following commands under the same directory of your containerized microservice file:
curl -i -H 'Authorization: Bearer <edge Access Token>' -F "image=@<file name>.tar" http://<target IP address>:8083/mcm/v1/images
  • To run the microservice after successful deployment, with environment variables:
curl -i -H 'Authorization: Bearer <edge Access Token>' -d '{"name": <file name>, "image": <image name>, "env": {"MCM.BASE_API_PATH": "<request base path>", "MCM.WEBSOCKET_SUPPORT": "true", "<add your environment variable name>": "<add your environment variable>"} }' http://<target IP address>:8083/mcm/v1/containers

About

This is a simple starter microservice to enable you get started on edge microservice development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%