https://github.com/gemblue/expressjs-prisma
https://github.com/gemblue/expressjs-prisma
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gemblue/expressjs-prisma
- Owner: gemblue
- Created: 2023-02-16T11:34:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T11:34:28.000Z (over 3 years ago)
- Last Synced: 2025-03-05T20:57:13.444Z (over 1 year 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