Coder Social home page Coder Social logo

yaaqoub / customers-microservice-nodejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mostafabalata/customers-microservice-nodejs

0.0 1.0 0.0 56 KB

An example how to build microservice using Express js, Mongodb and ES6. Its customer managing Microserivce which provides a simple RESTful API to get, add, edit and delete customers.

JavaScript 100.00%

customers-microservice-nodejs's Introduction

Customers management microservice

An example how to build microservice using Express js, Mongodb and ES6. Its customer managing Microserivce which provides a simple RESTful API to get, add, edit and delete customers.

How to run

its docker container that's run the image of the microservice working together with anther container that is running mongodb image,

docker-compose up

its working on http://localhost:3000 By running docker-compoose we have advatage of running multiple containers and to be sure that our service will start after database is ready.

How to run tests

Note: service doesnt have to be running.

  • Unit tests
yarn unit-test
  • Integration tests Note: make sure that the service is running using this command yarn serve-testing then you need to run the tests as following:
yarn integration-tests

Endpoint:

  • GET /customers: returning all the customers

  • POST /customers/:id : Updateing existing customer by sending json object in the body for the data you want to change.

  • PUT /customers : Add new customer by sending json object in the body for the data you want to change.

  • DELETE /customers/:id Delete certin customer

Thanks

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.