๐ณ Nest
September 20, 2021 ยท View on GitHub
About
This is a Moleculer-based project to manage personal microservices.
Usage
Start the project with npm run dev command.
After starting, open the http://localhost:3040/ URL in your browser.
On the welcome page you can test the generated services via API Gateway and check the nodes & services.
In the terminal, try the following commands:
nodes- List all connected nodes.actions- List all registered service actions.call greeter.hello- Call thegreeter.helloaction.call greeter.welcome --name John- Call thegreeter.welcomeaction with thenameparameter.
Services
๐ค API
This is the API Gateway service which connects each service to its endpoint.
๐ผ Asana
I've implemented this service to create an Habitica Task everytime I receive a task on Asana, which is the task manager we're using at work.
Also, I receieve a Telegram notification when a new task is created on a specific section.
๐ฎ Habitica
This one is to send a chat message to my Habitica's Party whenever I've leveled up and when there's a new quest invite, so my party fellows can accept it as soon as possible.
๐ฒ Telegram
The Telegram Service is mostly a bot that notifies me about new tasks and about postal orders status using the Tracking More service.
๐ฆ Tracking More
To be able to create new order trackings and receive their status, I've implemented this service using the Tracking More API. Since I've been buying cool stuff on AliExpress, it's useful to know when they're dispatched and are almost being delivered.
๐ Trello
There are some projects I'm keeping track of on Trello, so this service creates a new Habitica Task whenever a Trello Task is assigned to me.
๐ง Mocks
This service is only responsabile to let some mock data be available on a give endpoint, so I can consume it on others side projects.
๐ฉ AirTable
Here's a service that gets my stuff in AirTable.
๐ Badges
With this service I can generate and consume custom badges for my projects.
Useful links
- Moleculer website: https://moleculer.services/
- Moleculer Documentation: https://moleculer.services/docs/0.14/
NPM scripts
npm run dev: Start development mode (load all services locally with hot-reload & REPL)npm run start: Start production mode (setSERVICESenv variable to load certain services)npm run cli: Start a CLI and connect to production. Don't forget to set production namespace with--nsargument in scriptnpm run lint: Run ESLintnpm run ci: Run continuous test mode with watchingnpm test: Run tests & generate coverage report
Deploy
The deploy is made via TravisCI to Heroku