mirror of
https://github.com/SrIzan10/starters.git
synced 2026-05-01 11:05:16 +00:00
title, description, tags
| title | description | tags | ||||
|---|---|---|---|---|---|---|
| ExpressJS Prisma | An ExpressJS server that uses Prisma to connect to a PostgreSQL database |
|
ExpressJS Prisma Example
This is an ExpressJS REST API that uses Prisma to connect to a Postgres database and CRUD todos.
✨ Features
- Prisma
- Express
- Postgres
- TypeScript
💁♀️ How to use
- Install dependencies
yarn - Provision a Postgres container on Railway
- 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 /todosgets all todosPOST /todoscreates a new usingtextin the JSON bodyGET /todos/:idgets a todo by idPUT /todos/:idupdates a todo by idDELETE /todos/:iddeletes a todo by id