https://github.com/dj0nny/express-prisma-boilerplate
An Express - Prisma ORM boilerplate
https://github.com/dj0nny/express-prisma-boilerplate
boilerplate boilerplate-application express express-postgres express-prisma expressjs postgresql prisma prisma-postgres
Last synced: 3 months ago
JSON representation
An Express - Prisma ORM boilerplate
- Host: GitHub
- URL: https://github.com/dj0nny/express-prisma-boilerplate
- Owner: dj0nny
- Created: 2022-08-14T07:44:26.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2022-08-15T08:06:07.000Z (almost 4 years ago)
- Last Synced: 2025-09-02T17:47:14.353Z (11 months ago)
- Topics: boilerplate, boilerplate-application, express, express-postgres, express-prisma, expressjs, postgresql, prisma, prisma-postgres
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# express-prisma-boilerplate
An Express - Prisma ORM boilerplate
## Run Locally
Clone the project
```bash
git clone https://github.com/dj0nny/express-prisma-boilerplate.git
```
Go to the project directory
```bash
cd express-prisma-boilerplate
```
Install dependencies
```bash
npm install
```
Start the server
```bash
npm run dev
```
## Environment Variables
To run this project, you will need to edit the following environment variables to your .env file
`DATABASE_URL`
## Prisma Configuration
For this boilerplate, the default database client is __Postgres__.
You can clean up the example migration with `rm -rf ./prisma/migrations` command.
Before running this boilerplate, you need to update your `schema.prisma` located in the `./prisma` folder.
Inside this file will go the model definitions of your database tables. Once you update the models, you can update the database running `npx prisma migrate dev --name migration-name`.
This command is going to do two things:
1. It creates a new SQL migration file for this migration
2. It runs the SQL migration file against the database
Whenever you make changes to your Prisma schema in the future, you manually need to invoke `prisma generate` in order to accommodate the changes in your Prisma Client API.
### Seed
This boilerplate provides a `seed.js` file located in the `./prisma` folder. You can run it using `npx prisma db seed`.
## Tech Stack
Node.js, Express, Prisma.js, Postgres
## Authors
- [@dj0nny](https://github.com/dj0nny/)