https://github.com/jaaydenh/expressjs-prisma
https://github.com/jaaydenh/expressjs-prisma
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jaaydenh/expressjs-prisma
- Owner: jaaydenh
- Created: 2023-06-21T22:53:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-21T22:53:49.000Z (about 2 years ago)
- Last Synced: 2025-04-15T00:25:30.413Z (2 months ago)
- Language: TypeScript
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
title: ExpressJS Prisma
description: An ExpressJS server that uses Prisma to connect to a PostgreSQL database
tags:
- express
- postgresql
- prisma
- typescript
---# ExpressJS Prisma Example
This is an [ExpressJS](https://expressjs.com/) REST API that uses [Prisma](https://www.prisma.io/) to connect to a Postgres database and CRUD todos.
[](https://railway.app/new/template/LqCw_O)
## ✨ Features
- Prisma
- Express
- Postgres
- TypeScript## 💁♀️ How to use
- Install dependencies `yarn`
- [Provision a Postgres container on Railway](https://dev.new)
- Connect to your Railway project with `railway link`
- Migrate the database `railway run yarn migrate:dev`
- Run the Server app `railway run yarn dev`## 📝 Notes
This is a simple REST API for todo items. The available routes are
- `GET /todos` gets all todos
- `POST /todos` creates a new using `text` in the JSON body
- `GET /todos/:id` gets a todo by id
- `PUT /todos/:id` updates a todo by id
- `DELETE /todos/:id` deletes a todo by id