https://github.com/fredvuni/prisma-express
Rest API in Node , Express app server using prisma ORM and postgresQL
https://github.com/fredvuni/prisma-express
express git-actions postgresql prisma render rest rest-api
Last synced: 5 months ago
JSON representation
Rest API in Node , Express app server using prisma ORM and postgresQL
- Host: GitHub
- URL: https://github.com/fredvuni/prisma-express
- Owner: FREDVUNI
- Created: 2022-06-29T09:55:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-15T08:44:46.000Z (over 1 year ago)
- Last Synced: 2024-09-15T11:22:21.629Z (over 1 year ago)
- Topics: express, git-actions, postgresql, prisma, render, rest, rest-api
- Language: JavaScript
- Homepage: https://prisma-express-n397.onrender.com
- Size: 163 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prisma Node JS Express RESTAPI
## 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 start` 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
### `/users/signup`
- `POST`: Create a new user
### `/users/signin`
- `POST`: login user
### `/users/:id`
- `GET`: Get a specific user
- `PUT`: Update a specific user
- `DELETE`: Delete a specific user
### Render
https://prisma-express-n397.onrender.com/