Files
archived-starters/examples/expressjs-prisma/README.md
2021-02-03 06:45:59 +00:00

1011 B

ExpressJS Prisma Example

This is an ExpressJS REST API that uses Prisma to connect to a Postgres database and CRUD todos.

Deploy on Railway

Features

  • Prisma
  • Express
  • Postgres
  • TypeScript

💁‍♀️ How to use

  • Install dependencies yarn
  • Provision a Postgres container on Railway
  • Connect to your Railway project with railway init
  • 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