title | description | tags | ||||
---|---|---|---|---|---|---|
ExpressJS Prisma |
An ExpressJS server that uses Prisma to connect to a PostgreSQL database |
|
This is an ExpressJS REST API that uses Prisma to connect to a Postgres database and CRUD todos.
- Prisma
- Express
- Postgres
- TypeScript
- Install dependencies
npm install
- Provision a Postgres container on Railway
- Connect to your Railway project with
railway link
- Migrate the database
railway run npm run migrate:dev
- Run the Server app
railway run npm run dev
This is a simple REST API for todo items. The available routes are
GET /todos
gets all todosPOST /todos
creates a new usingtext
in the JSON bodyGET /todos/:id
gets a todo by idPUT /todos/:id
updates a todo by idDELETE /todos/:id
deletes a todo by id