Skip to content

Kikobeats/tom-example

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published