0.1.0 • Published 6 years ago

@hokid/transcan v0.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

Install

$ npm install -g @hokid/transcan

Usage

  1. Make directory for transcan
$ makedir transcan-example
$ cd transcan-example
  1. Create configuration file, for example, .transcan.config.js.

Put this in configuration file and replace placeholders.

module.exports = {
  tasks: [
    { name: 'BTC', scheduleTime: <CRON_SCHEDULIGN_FORMAT> },
    { name: 'ETH', scheduleTime: <CRON_SCHEDULIGN_FORMAT> }
  ],
  db: {
    host: <POSTGRES_HOST>,
    port: <POSTGRES_PORT>,
    user: <POSTGRES_USER>,
    password: <POSTGRES_PASSWORD>,
    database: <POSTGRES_DATABASE>
  },
  apiBase: <API_URL>,
  cacheFile: <NAME_FOR_CACHE_FILE>
}
  1. Run it:

    $ transcan -c .transcan.config.js