/api-v3

The rewritten Discoin API

Primary LanguageTypeScript

Discoin

Build Status XO code style

The new Discoin API.

Contributing

Prequisites

This project uses Node.js 12 to run.

This project uses Yarn to install dependencies, although you can use another package manager like npm or pnpm.

yarn install
# or `npm install`
# or `pnpm install`

Building

Run the build script to compile the TypeScript into the tsc_output folder. This will compile the src and the test directory, so be careful not to upload the whole folder as a published package.

Style

This project uses Prettier and XO.

You can run Prettier in the project with this command:

yarn run format

You can run XO with this command:

yarn run lint

Note that XO will also error if you have TypeScript errors, not just if your formatting is incorrect.

Linting

This project uses XO (which uses ESLint and some plugins internally) to perform static analysis on the TypeScript. It reports things like unused variables or not following code conventions.

yarn run lint

Note that XO will also error if you have incorrect formatting, not just if your TypeScript code has errors.

Hosting

This server is designed to run in a Docker environment hosted on an Ubuntu operating system (18.04).

Hosting Prequisites

Setup

  1. Setup user account

  2. Clone this repository (required for the docker-compose.yml file)

       git clone https://github.com/Discoin/rewrite.git discoin
  3. Populate the .env file

  4. Start the containers

    docker-compose -f "docker-compose.yml" up -d