lazeebee / tom-example

A tom microservice example

Home Page:https://tom.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tom-example

backoffice microservice example powered by tom-microservice.

Deploy Deploy to now

Getting started

You need to install the project dependencies with npm install.

Then you are ready to run tom 🐶.

Configuration

Defining basic configuration

Your configuration project live at tom.config.js.

Under the hood we are using config for differenciate between development and production credentials.

Using Event System

Every time a command is executed, it emits an event.

You can use these events for connecting the service with your specific code.

Read Event System section at docs for knowing more.

Launch

from CLI

Just run npx tom passing the flags for execute a certain command, for example:

npx tom --command=notification.email --templateId=summary --to=leo@hyperping.io --username=Leo

You can use tom --help or see scripts to see it in action.

from HTTP microservice

Running npm run dev start a development HTTP server in your machine.

Execute for started a HTTP server in your machine. The server has hot reloading.

Production Ready

The service is almost production ready. You need to provide the Environment Variables for:

After that, just run your service with npm start 🎉.

About

A tom microservice example

https://tom.js.org

License:MIT License


Languages

Language:Shell 82.8%Language:JavaScript 17.2%