Skip to content

Commit

Permalink
chore: Update README.md
Browse files Browse the repository at this point in the history
Co-authored-by: FREDVUNI <[email protected]>
  • Loading branch information
FREDVUNI and FREDVUNI authored May 10, 2023
1 parent eaf4ede commit 5aef7ef
Showing 1 changed file with 51 additions and 2 deletions.
53 changes: 51 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
# prisma node restAPI
# Prisma Node JS Express RESTAPI

Rest API in Node , Express app server using prisma ORM and postgresQL
## Overview
This Rest API is built with Node.js, Express, Prisma ORM, and PostgresQL. It provides CRUD functionality for a simple quotes application. Users can create, read, update, and delete quotes, as well as create and read authors and users.

## Prerequisites
Before running this Rest API, you need to have the following installed on your machine:
- Node.js
- PostgresQL

## Installation
1. Clone this repository to your local machine
2. Navigate to the cloned directory
3. Run `npm install` to install all the necessary dependencies
4. Create a `.env` file in the root directory of the project and set the following environment variables:
- DATABASE_URL: URL to your PostgresQL database
- PORT: Port number for the server to run on
5. Run `npx prisma migrate dev` to apply the database schema to your database
6. Run `npm run dev` to start the server

## Endpoints
This Rest API has the following endpoints:

### `/authors`
- `GET`: Get all authors
- `POST`: Create a new author

### `/authors/:id`
- `GET`: Get a specific author
- `PUT`: Update a specific author
- `DELETE`: Delete a specific author

### `/quotes`
- `GET`: Get all quotes
- `POST`: Create a new quote

### `/quotes/:id`
- `GET`: Get a specific quote
- `PUT`: Update a specific quote
- `DELETE`: Delete a specific quote

### `/users`
- `GET`: Get all users
- `POST`: Create a new user

### `/users/:id`
- `GET`: Get a specific user
- `PUT`: Update a specific user
- `DELETE`: Delete a specific user

## Conclusion
That's it! You should now have a working Rest API in Node, Express app server using Prisma ORM and PostgresQL. Feel free to modify the code to suit your needs.

0 comments on commit 5aef7ef

Please sign in to comment.