Git Product home page Git Product logo

boilerplate-nodejs-microservice's Introduction

Boilerplate Nodejs MicroService - SmartinfoLogiks

Boilerplate to quickly start a new MicroService only project. This does not have a lots of wasted code. Just Point Blank Basic MicroService.

Installation

  • Clone the repo
  • Install using npm install
  • Create a .env file from env_sample
  • Update the paramaters in .env
    • MS_DISOVERY_SERVER defines Micro Service Master Host Link (Blank by default), without this the MicroService will not register itself with Master Server
    • MS_DISOVERY_APPKEY defines Micro Service Master Host AppKey (Blank by default)
    • MS_DISOVERY_SECRET defines Micro Service Master Host Encryption Key (Blank by default)
    • MS_CURRENT_PORT defines which port to run the current services on
  • Done, now start using npm start.

This should give you a basic api at 8989 (If you have not changed the port). Hit the URL printed on Console and verify if its running.

Extending to use the system

  • Just add as many routes into the api/routes folder
  • Restart the node processs
  • Thats it, as simple as that

MicroService Specs

  1. On Bootstrap Register With Control and Discovery Server
  2. Register all subapi route paths with Control and Discovery Server (optional)
  3. Provide /ok route path for Control and Discovery Server to monitor the service

boilerplate-nodejs-microservice's People

Contributors

silkadmin avatar

Watchers

James Cloos avatar Bismay Kumar Mohapatra avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.