All Projects β†’ TranBaVinhSon β†’ microservice_nodejs_template

TranBaVinhSon / microservice_nodejs_template

Licence: other
πŸ¦„ Microservice Starter Kit by Nodejs + Typescript + Docker + Lerna + Eslint + Prettier

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to microservice nodejs template

vue-typescript-prettier
Vue project with TypeScript, ESLint, and Prettier integrated together
Stars: ✭ 22 (-55.1%)
Mutual labels:  prettier, prettier-eslint
mean-ionic-ngrx
Monorepo as Microservices: Full MEAN stack with Angular 7, Ionic 4 and ReactiveX API (ngrx/Store + ngrx/Effects) + i18n/ngx-translate + Express NodeJS REST API servers micro-services + JWT Authentication + UnitTest/e2e exemple + Travis + DevOps scripts and many more...
Stars: ✭ 60 (+22.45%)
Mutual labels:  microservices-architecture, lernajs
fe-standard-config-seed
ε‰η«―ι€šη”¨δ»£η θ§„θŒƒθ‡ͺεŠ¨εŒ–ζŽ₯ε…₯
Stars: ✭ 18 (-63.27%)
Mutual labels:  prettier, lerna
linter-sniffer-pretty-printer
Collection of packages and configs to lint and format code in your WordPress project.
Stars: ✭ 35 (-28.57%)
Mutual labels:  prettier, prettier-eslint
react-component-library-lerna
Build your own React component library managed with lerna, presented with storybook and published in private npm registry.
Stars: ✭ 55 (+12.24%)
Mutual labels:  prettier, lernajs
SENT-template
Skip setup and start code with SENT (Sapper Express Node Template) and other tools
Stars: ✭ 69 (+40.82%)
Mutual labels:  prettier, prettier-eslint
eslint-config-adjunct
A reasonable collection of plugins to use alongside your main esLint configuration
Stars: ✭ 39 (-20.41%)
Mutual labels:  prettier, prettier-eslint
eslint-config-ns
ESLint config ready to be used in multiple projects. Based on Airbnb's code style with prettier, jest and react support.
Stars: ✭ 27 (-44.9%)
Mutual labels:  prettier, prettier-eslint
the-art-of-unit-testing
Repository that contains code in Node.js from the book The Art of Unit Testing, Second Edition by Roy Osherove
Stars: ✭ 22 (-55.1%)
Mutual labels:  prettier
lerna-sync
A package to synchronize distributed GitHub repos inside a Lerna monorepo.
Stars: ✭ 15 (-69.39%)
Mutual labels:  lerna
promotion-web
基于React: v18.x.x/Webpack: v5.x.x/React Router v6.x.x/ Antd: v5..x.x/Fetch Api/ Typescript: v4.x.x η­‰ζœ€ζ–°η‰ˆζœ¬θΏ›θ‘Œζž„ε»Ί...
Stars: ✭ 374 (+663.27%)
Mutual labels:  prettier
prettier-config-solidity
Prettier config optimized to reduce AST churn & conform to solidity spec
Stars: ✭ 28 (-42.86%)
Mutual labels:  prettier
shared-react-components-example
An example of a mono-repository of shared React components libraries!
Stars: ✭ 85 (+73.47%)
Mutual labels:  lerna
prettier.el
Prettier code formatting for Emacs.
Stars: ✭ 129 (+163.27%)
Mutual labels:  prettier
cra-monorepo-demo
Monorepo example using create-react-app and common component library structure with yarn workspaces
Stars: ✭ 37 (-24.49%)
Mutual labels:  lerna
create-next-stack
Create Next Stack is a website and CLI tool used to easily set up the boilerplate of new Next.js apps.
Stars: ✭ 149 (+204.08%)
Mutual labels:  prettier
okta-microservice-security-examples
Demos from Oktane18: API and Microservices Best Practices
Stars: ✭ 17 (-65.31%)
Mutual labels:  microservices-architecture
dotnet-core-microservices-kafka
Asp.Net Core microservices that communicate asynchronous through Kafka message broker.
Stars: ✭ 42 (-14.29%)
Mutual labels:  microservices-architecture
react-you-do-you
How I use React + Redux + Material-UI + TypeScript – you do you πŸ’–
Stars: ✭ 103 (+110.2%)
Mutual labels:  prettier
vitx
πŸ˜ƒ Simple transform tool
Stars: ✭ 137 (+179.59%)
Mutual labels:  lerna

Microservice Nodejs Template

Prettier Lerna Documentation License: MIT

Lerna + Docker + Typescript + EsLint + Prettier

Table of Contents

Introduction

The simple project shows how to setup monorepo by Typescript + Docker + Lerna + Eslinter + Prettier.

The project has 3 packages (inside packages directory)

  • api_gateway (http server)
  • backend (http server)
  • base (shared package between api_gateway and backend)

Note: Each package has its own eslint, tsconfig, preitter config.

Techstack

  • Lerna - A tool for managing JavaScript projects with multiple packages
  • TsED - A TypeScript Framework on top of Express
  • Docker
  • Eslint + Prettier

Install

make install-all

That's it πŸš€

Usage

Go to root project: cd microservice_nodejs_template

Running project

docker-compose up

That's it πŸš€

After run docker-compose up, you will see api_gateway container runs on 3000 port. and backend container runs on 8000 port.

(you can also check the api by make a request to GET localhost:3000/api/v1/users/)

Screen Shot 2019-12-07 at 4 14 47 PM

Compile ts to js

  • Compile all packages
npm run build
  • Compile api_gateway package
npm run build:api_gateway
  • Compile backend package
npm run build:backend
  • Compile base package
npm run build:base

Running Eslint

  • Running Eslint on all packages
npm run eslint

Project Structure

Each package under the packages folder.

microservice_nodejs_template
β”œβ”€β”€ docker/
β”‚   β”œβ”€β”€ api_gateway/
β”‚   β”‚   └── Dockerfile
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   └── Dockerfile
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ api_gateway/
β”‚   β”‚   └── src/
β”‚   β”‚   β”œβ”€β”€ package.json
β”‚   β”‚   β”œβ”€β”€ tsconfig.json
β”‚   β”‚
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   └── src/
β”‚   β”‚   └── package.json
β”‚   β”‚   β”œβ”€β”€ tsconfig.json
β”‚   β”‚
β”‚   β”œβ”€β”€ base/
β”‚   β”‚   └── src/
β”‚   β”‚   └── package.json
β”‚   β”‚   β”œβ”€β”€ tsconfig.json
β”‚
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ package.json
β”œβ”€β”€ lerna.json
β”œβ”€β”€ README.md

api_gateway container structure

microservice_nodejs_template
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ api_gateway/
β”‚   β”‚   └── src/
β”‚   β”‚   β”œβ”€β”€ package.json
β”‚   β”‚   β”œβ”€β”€ tsconfig.json
β”‚   β”‚
β”‚   β”œβ”€β”€ base/
β”‚   β”‚   └── src/
β”‚   β”‚   └── package.json
β”‚   β”‚   β”œβ”€β”€ tsconfig.json
β”‚
β”‚
β”œβ”€β”€ package.json
β”œβ”€β”€ lerna.json

backend container structure

microservice_nodejs_template
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   └── src/
β”‚   β”‚   β”œβ”€β”€ package.json
β”‚   β”‚   β”œβ”€β”€ tsconfig.json
β”‚   β”‚
β”‚   β”œβ”€β”€ base/
β”‚   β”‚   └── src/
β”‚   β”‚   └── package.json
β”‚   β”‚   β”œβ”€β”€ tsconfig.json
β”‚
β”‚
β”œβ”€β”€ package.json
β”œβ”€β”€ lerna.json

Contributing

Contributions, issues and feature requests are welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].