🦄 Microservice Starter Kit by Nodejs + Typescript + Docker + Lerna + Eslint + Prettier
The simple project shows how to setup monorepo by Typescript + Docker + Lerna + Eslinter + Prettier.
The project has 3 packages (inside packages directory)
api_gateway
and backend
)Note: Each package has its own eslint, tsconfig, preitter config.
make install-all
That's it 🚀
Go to root project: cd microservice_nodejs_template
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/
)
npm run build
api_gateway
packagenpm run build:api_gateway
backend
packagenpm run build:backend
base
packagenpm run build:base
npm run eslint
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
structuremicroservice_nodejs_template
├── packages/
│ ├── api_gateway/
│ │ └── src/
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │
│ ├── base/
│ │ └── src/
│ │ └── package.json
│ │ ├── tsconfig.json
│
│
├── package.json
├── lerna.json
backend container
structuremicroservice_nodejs_template
├── packages/
│ ├── backend/
│ │ └── src/
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │
│ ├── base/
│ │ └── src/
│ │ └── package.json
│ │ ├── tsconfig.json
│
│
├── package.json
├── lerna.json
Contributions, issues and feature requests are welcome.