GithubHelp home page GithubHelp logo

timmeade / service-db Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 33 KB

A base boilerplate node.js microservice framework which includes Rest API and gRPC interactions.

License: MIT License

JavaScript 92.60% Protocol Buffer 7.40%

service-db's Introduction

node-microservice-api-grpc

NOTICE

This is a big time early work. We are posting at this early stage as we could not find anything that met our needs. It is here STRICTLY for review and we HIGHLY advise not to use this ANYWHERE NEAR PRODUCTION.

We are very interested in thoughts or comments though.

Intentions are great things. Well, we INTEND to actively add to this as we are building out a large kubernetes stack and this (for now) is our boilerplate for the services. Stay tuned for rapid updates.

Requirements

The initial requirements were:

  • Node.js based
  • Initial rest based API for external access (if needed)
  • gRPC for inter services communications.
  • GraphQL for API enhancements. (Planned)

Getting Started

Git clone this repo onto your local drive. yarn or npm install.

Prerequisites

  • Node > 7
  • NPM or Yarn
  • Nodemon if desired (change package.json script if not)

Running the tests

No tests currently. Stay tuned.

There are examples. See the API section and the gRPC section.

Deployment

This is being designed and meant for kubernetes clusters. We will be adding detailed documentation for running on docker and kubernetes.

Structure

The code should be pretty easy to follow. The gRPC is under the grpc folder and the restify api server is under the api server.

gRPC

We have built a gRPC client example in the /examples/grpc folder. The code is self-explanatory we hope. Works in conjuntions with the grpcServer in the /grpc folder.

node client list
node client add
node client insert 1 Bob [email protected]
node client get 123
node client delete 1
node client watch # Run in seperate terminal will push new users to screen

API

There are two current API endpoints:

A basic health check

curl http://0.0.0.0:7007/health

Get the base.proto file for client gRPC creating (We are wondering why the proto file is not loadd dynamically from the server, but hey we are new to this also).

curl http://0.0.0.0:7007/proto

TODO

  • testing
  • ops integrations for monitoring
  • docker files
  • kubernetes files
  • the kitchen sink

Contributing

We are interested in contributors. If you feel some passion for a project like this. Drop us a line.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Thanks to @mxstbr and everyone who worked on react-boilerplate. Great inspiration.
  • The node.js community
  • And all the new friends in the kubernetes groups.

service-db's People

Watchers

 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.