🎓 Moleculer-based microservices project template for Typescript project.
- Moleculer v0.13.x with full-detailed
moleculer.config.ts
file. - Common project with a demo
greeter
service. - Optional API Gateway service.
- Optional Transporter & Cacher.
- Docker & Docker Compose files.
- Unit tests with Jest.
- Lint with TSLint.
- Launch file for debugging in VSCode.
To install use the moleculer-cli tool.
$ moleculer init ipetrovic11/moleculer-template-typescript my-project
$ moleculer init project-typescript moleculer-demo
Template repo: moleculerjs/moleculer-template-project-typescript
? Add API Gateway (moleculer-web) service Yes
? Would you like to communicate with other nodes? Yes
? Select a transporter TCP
? Would you like to use cache? No
? Add Docker files? Yes
? Use TSLint to lint your code? Yes
? Setup unit tests with Jest? Yes
Create 'moleculer-demo' folder...
? Would you like to run 'npm install'? Yes
npm run dev
- Start development mode (load all services locally with hot-reload & REPL)npm run build
- Uses typescript to transpile service to javascriptnpm start
- Start production mode (setSERVICES
env variable to load certain services) (previous build needed)npm run cli
: Start a CLI and connect to production. Don't forget to set production namespace with--ns
argument in scriptnpm run lint
- Run TSLintnpm run ci
- Run continuous test mode with watchingnpm test
- Run tests & generate coverage reportnpm run dc:up
: Start the stack with Docker Composenpm run dc:down
: Stop the stack with Docker Compose
moleculer-template-project-typescript is available under the MIT license.
Copyright (c) 2018 MoleculerJS