deman4ik / cryptuoso

Cryptuoso - Cryptocurrency Trading Robots

Home Page:https://cryptuoso.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Cryptuoso - Cryptocurrency Trading Automation




Repository

Code organized using Nx.

Development

Services (applications)

Creating new service

  1. Run npm run gen:app -- my-app to generate new service (application).

  2. Add "build:my-app": "nx build my-app --prod" and "serve:my-app": "nx serve my-app" to package.json scripts sections

  3. Create file apps/my-app/src/app/service.ts with class which extends BaseService or HttpService from @cryptuoso/service.

  4. Update file apps/my-app/src/main.ts whith service starting script:

import Service from "./app/service";
import log from "@cryptuoso/logger";

const service = new Service();

async function start() {
    try {
        await service.startService();
    } catch (error) {
        log.error(`Failed to start service ${process.env.SERVICE}`, error);
        process.exit(1);
    }
}
start();
  1. Copy deployments/deployment-template.yaml file to deployments/my-app.yaml, add environment variables and change ports

Generate a library

Run npm run gen:lib -- my-lib to generate a library.

Build

Run nx build my-app to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run nx test my-app to execute the unit tests via Jest.

Run nx affected:test to execute the unit tests affected by a change.

Understand dependencies

Run nx dep-graph to see a diagram of the dependencies.

About

Cryptuoso - Cryptocurrency Trading Robots

https://cryptuoso.com

License:MIT License


Languages

Language:TypeScript 99.9%Language:JavaScript 0.1%Language:Dockerfile 0.0%Language:Shell 0.0%