DrRaider / Billy

Tech test for billyapp.live

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Billy technical test

Link

Installation

$ yarn install

$ mv .env.example .env

Database setup

$ docker-compose up -d

$ yarn db:seed

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

API Test

# Fetch all events
HTTP GET "http://localhost:3000/events"

# Fetch all events with date filters on sale start time
# "from" and "to" are optional query parameters
# They must follow the "DD/MM/YYYY" pattern
HTTP GET "http://localhost:3000/events?from=DD/MM/YYYY&to=DD/MM/YYYY"

# Fetch one event by id
HTTP GET "http://localhost:3000/events/:id"

# Update one event by id
# Body can have the following properties:
  # title?: string;
  # lineup?: string[];
  # assetUrl?: string;
  # collectionNames?: [
  #   {
  #     from: string;
  #     to: string;
  #   },
  # ];
# "from" and "to" are used to find which collectionNames should be updated.
HTTP PUT "http://localhost:3000/events/:id"

About

Tech test for billyapp.live


Languages

Language:TypeScript 94.0%Language:JavaScript 6.0%