https://github.com/arifintahu/moleculer-express
Template service using moleculer and express
https://github.com/arifintahu/moleculer-express
expressjs moleculerjs nodejs postgresql service template
Last synced: 3 months ago
JSON representation
Template service using moleculer and express
- Host: GitHub
- URL: https://github.com/arifintahu/moleculer-express
- Owner: arifintahu
- Created: 2021-05-18T10:09:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-25T00:34:57.000Z (about 5 years ago)
- Last Synced: 2025-04-06T00:43:48.520Z (about 1 year ago)
- Topics: expressjs, moleculerjs, nodejs, postgresql, service, template
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://moleculer.services)
# Moleculer with express.js template project
This is a template project for building API service using [Moleculer](https://moleculer.services/) and express.js. It also uses PostgreSQL as database and Sequelize as ORM.
## Usage
Start the project with `npm run dev` command.
In the terminal, try the following commands:
- `nodes` - List all connected nodes.
- `actions` - List all registered service actions.
- `call user.test` - Call the `user.test` action.
- `call user.hello` - Call the `user.hello` action.
## Services
- **api**: API Gateway services
- **user**: Sample service with `test`, `hello`, and `user` actions.
## NPM scripts
- `npm run dev`: Start development mode (load all services locally 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 ci`: Run continuous test mode with watching
- `npm test`: Run tests & generate coverage report