@hokid/transcan

    0.1.0 • Public • Published

    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>
    }
     
    • CRON_SCHEDULIGN_FORMAT - for scheduling task used https://github.com/node-schedule/node-schedule.
    • POSTGRES_* - settings for connection to postgres server
    • API_URL - base url for api to send transactions (https://example.com)
    • NAME_FOR_CACHE_FILE - name for cache file (.cache.json)
    1. Run it:
    $ transcan -c .transcan.config.js

    Keywords

    none

    Install

    npm i @hokid/transcan

    DownloadsWeekly Downloads

    8

    Version

    0.1.0

    License

    ISC

    Unpacked Size

    27.2 kB

    Total Files

    26

    Last publish

    Collaborators

    • hokid