Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moleculerjs/moleculer-template-project-typescript
Typescript project template for Moleculer microservices framework.
https://github.com/moleculerjs/moleculer-template-project-typescript
moleculer moleculer-template
Last synced: 3 months ago
JSON representation
Typescript project template for Moleculer microservices framework.
- Host: GitHub
- URL: https://github.com/moleculerjs/moleculer-template-project-typescript
- Owner: moleculerjs
- License: mit
- Created: 2018-08-27T21:52:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-13T14:03:13.000Z (10 months ago)
- Last Synced: 2024-04-14T07:51:46.321Z (7 months ago)
- Topics: moleculer, moleculer-template
- Language: TypeScript
- Homepage:
- Size: 499 KB
- Stars: 120
- Watchers: 7
- Forks: 44
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-moleculer - moleculer-template-project-typescript - Project template for Typescript project. (Templates / Typescript)
README
# Moleculer template: `project-typescript`
:mortar_board: Moleculer-based microservices project template for Typescript project.## Features
- Moleculer v0.14 with full-detailed `moleculer.config.ts` file.
- Common mono-repo project with a demo `greeter` service.
- Sample database `products` service (with file-based NeDB in development & MongoDB in production).
- Optional API Gateway service with detailed service settings.
- Beautiful static welcome page to test generated services & watch nodes and services.
- Optional Transporter & Cacher.
- Metrics & Tracing.
- Docker & Docker Compose & Kubernetes files.
- Unit tests with [Jest](http://facebook.github.io/jest/).
- Lint with [ESLint](http://eslint.org/).
- Launch file for debugging in [VSCode](https://code.visualstudio.com/).## Install
To install use the [moleculer-cli](https://github.com/moleculerjs/moleculer-cli) tool.```bash
$ moleculer init project-typescript my-project
```## Prompts
```
$ moleculer init project-typescript moleculer-demoTemplate 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 NATS (recommended)
? Would you like to use cache? Yes
? Select a cacher solution Memory
? Would you like to enable metrics? Yes
? Select a reporter solution Prometheus
? Would you like to enable tracing? Yes
? Select a exporter solution Console
? Add Docker & Kubernetes sample files? Yes
? Use ESLint to lint your code? Yes
Create 'moleculer-demo' folder...
? Would you like to run 'npm install'? Yes
```## NPM scripts
- `npm run dev`: Start development mode (load all services locally without transporter with hot-reload & REPL)
- `npm run start`: Start production mode (set `SERVICES` env variable to load certain services)
- `npm run cli`: Start a CLI and connect to production. _Don't forget to set production namespace with `--ns` argument in script_
- `npm run lint`: Run ESLint
- `npm run ci`: Run continuous test mode with watching
- `npm test`: Run tests & generate coverage report
- `npm run dc:up`: Start the stack with Docker Compose
- `npm run dc:logs`: Watch & follow the container logs
- `npm run dc:down`: Stop the stack with Docker Compose## License
moleculer-template-project-typescript is available under the [MIT license](https://tldrlegal.com/license/mit-license).## Contact
Copyright (c) 2023 MoleculerJS[![@moleculerjs](https://img.shields.io/badge/github-moleculerjs-green.svg)](https://github.com/moleculerjs) [![@MoleculerJS](https://img.shields.io/badge/twitter-MoleculerJS-blue.svg)](https://twitter.com/MoleculerJS)