Sign inSign up

bambudocker/customerservice

By bambudocker

•Updated over 3 years ago

Customer Service

Image
0

9.4K

bambudocker/customerservice repository overview

⁠BAMBU Base Service

⁠Add this line for deployment
⁠add another line to test deployment
⁠add another line to test deployment

Base service configuration for all microservices

⁠Prerequisites

We will be using the latest LTS version of Node.js, which at the time of writing, is v8.9.4.

Node.js - download at nodejs.org⁠ or install via Node Version Manager⁠, and

npm - v5.6.0 included with your Node.js installation.

Install loopback cli

  npm/yarn install -g loopback-cli

This installs the lb command-line tool for scaffolding and modifying LoopBack applications

⁠Initialization

npm/yarn install

Install all project dependencies

⁠Development
npm/yarn start

Starts the development server and makes your application accessible at localhost:3000.

⁠Creating Restful microservies using Loopback Generators⁠

Edit datasource database name

{
  "db": {
    "host": "bambu-postgres.co8o5pwx7mvv.ap-southeast-1.rds.amazonaws.com",
    "port": 5432,
    "url": "postgres://root:Bambu2018@bambu-postgres.co8o5pwx7mvv.ap-southeast-1.rds.amazonaws.com:5432/<db_name>",
    "database": "<db_name>",
    "password": "Bambu2018",
    "name": "db",
    "user": "root",
    "connector": "postgresql"
  }
}

Create a model

lb model

Model should be server only, Don't select common

Follow the succeeding steps on the cli

⁠Unit testing

npm test

Run the unit test written in mocha⁠ and chai⁠

⁠Linting

npm run lint

Lints your JavaScript using Airbnb style guide⁠

⁠Option 1 of Sending PR to Base service

mkdir /e/pr
git clone /e/microservices/customer-service-cpamthai /e/pr/customer-service
cd /e/pr/customer-service
git remote set-url origin [email protected]:bambudeveloper/customer-service.git
git checkout -b feature/merge-cpamthai
git push origin feature/merge-cpamthai
# maybe able do something with git request-pull?
# after finish pr
rm -Rf /e/pr/customer-service

Tag summary

Content type

Image

Digest

sha256:8cb67f3dd…

Size

96.6 MB

Last updated

over 3 years ago

docker pull bambudocker/customerservice:nestegg