Skip to content
forked from ungdev/UA-api

API web à destination des services de l'UTT Arena

License

Notifications You must be signed in to change notification settings

cmlichen-UTT/UA-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UA-api

Build Status codecov Read the Docs

API web à destination des services de l'UTT Arena

Avant toute chose, prenez connaissance de la documentation.

Requirements

Installation

git clone [email protected]:ungdev/UA-api.git
# or
git clone https://github.com/ungdev/UA-api.git

cd UA-api

# Install all the dependencies
yarn

# Copy the file .env.example to .env

cp .env.example .env

# Then, edit the variable DATABASE_URL in the file .env

Then, connect to your database (MySQL/MariaDB) and enter

CREATE DATABASE arena CHARACTER SET utf8;

Create the tables

yarn prisma db push

Populate the tables

mysql -u DATABASE_USER -p arena --protocol tcp < seed.sql

Generate the prisma client (redo this command when you update schema.prisma)

yarn prisma generate

Configuration

Edit the file .env with your values

Commands

yarn dev       # start development server
yarn build     # builds the typescript to javascript
yarn start     # start production server
yarn lint      # checks if the code is correct
yarn lint-fix  # try to fix lint errors and warnings
yarn fake      # populate the database with fake data

Prisma config

Use npx prisma generate to generate your prisma client

How to test

The tests must be able to run without any environment variables except the database

Documentation

We build the documentation with Sphinx based on markdown. If you want to compile the documentation on your local PC, you will need to have Python 3 and then type the following commands:

cd docs
pip3 install -r requirements.txt
make html

It will create a build folder where the doc is located

About

API web à destination des services de l'UTT Arena

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 93.0%
  • HTML 6.6%
  • Other 0.4%