Skip to content

Latest commit

 

History

History
118 lines (69 loc) · 1.66 KB

README.md

File metadata and controls

118 lines (69 loc) · 1.66 KB

Prisma-ORM

The project is created using Typescript , Prisma and NodeJS .

API Reference

Get All Players

  GET /api/player

Post a Player

  Post /api/player
Parameter Type Description
name string Required. name of player
country string Required. country

Update a Player

  Put /api/player/${id}
Parameter Type Description
name string Required. name of player
country string Required. country

Get Team Stats

  GET /api/team/stats/${id}
Parameter Type Description
id number Required. Id of item to fetch

Deployment

To run this project run

  npm run start

To deploy the database

  npx prisma migrate deploy

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

DATABASE_URL

API_PORT

Run Locally

Clone the project

  git clonehttps://github.com/thapar-vansh/prisma-ORM.git

Go to the project directory

  cd my-project

Install dependencies

  npm install

Start the server

  npm run start:dev

Running Tests

To run tests, run the following command

  npm run test

Tech Stack

** Node, Express, Prisma, Typescript **

Authors