Skip to content

moe-moaid/competition-api

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ yarn install

Running the app locally

# 1. create database with psql
CREATE USER db_username WITH PASSWORD db_password;
CREATE DATABASE db_name OWNER db_username;
ALTER USER moe CREATEDB;

# 2. migrate prisma to create the DB
npx prisma generate
npx prisma migrate dev

# 3. start the nest server
yarn start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Evnironment variables

make sure to have a .env file in your root directory that has this variable:

DATABASE_URL="postgresql://db_username:db_password@localhost:postgre_port/db_name?schema=public"

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

EAch time after modifing the schema you need to:

npx prisma format
npx prisma generate
npx prisma migrate dev --name discriptive-name-for-the-migration
yarn start:dev

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

About

A Nest.js API for the competition platform i am building

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors