Skip to content

Latest commit

 

History

History

l2-api

Orakl Network L2-Api

Installation

yarn install

Settings

Orakl Network L2 Config API requires to set the following environment variables.

  • DATABASE_URL
  • APP_PORT

You can copy them from .env.example to .env and fill the appropriate values.

cp .env.example .env

Local development

brew install postgresql@14
brew services start postgresql@14
createdb orakl-l2-api
#dropdb orakl-l2-api

Prisma

npx prisma format
npx prisma migrate dev --name init

Running the app

# development
yarn run start

# watch mode
yarn run start:dev

# production mode
yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Endpoints

Health

GET http:https://localhost:3000/api/v1

Open API (Swagger)

GET http:https://localhost:3000/docs