Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keidsondesigner/expressjs-prisma2
https://github.com/keidsondesigner/expressjs-prisma2
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/keidsondesigner/expressjs-prisma2
- Owner: keidsondesigner
- Created: 2023-04-04T03:41:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-19T19:36:51.000Z (6 months ago)
- Last Synced: 2024-05-20T21:17:17.570Z (6 months ago)
- Language: TypeScript
- Homepage: https://expressjs-prisma2.vercel.app
- Size: 60.5 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.
[![Deploy on Railway](https://railway.app/button.svg)](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