Files
archived-starters/javascript/with-prisma
Jake Runzer 7336895dcc init
2020-09-11 19:02:13 +01:00
..
2020-09-11 19:02:13 +01:00
2020-09-11 19:02:13 +01:00
2020-09-11 19:02:13 +01:00
2020-09-11 19:02:13 +01:00
2020-09-11 19:02:13 +01:00
2020-09-11 19:02:13 +01:00

with-prisma

This example uses Prisma to access and interact with the Railway PostgreSQL database.

Usage

  • Install dependencies yarn install
  • Init a Railway project yarn railway init
  • Generate Prisma yarn generate
  • Open the project in the Railway dashboard yarn railway open
  • Run the code yarn start

Optionally, run yarn migrate:up to create a Users and Posts folder and follow Prisma's Quickstart!

Prisma support

Prisma has fantastic TypeScript support. If you open src/index.ts in an editor like VSCode, you will get autocompletion and type hints when querying the database.

All of Prisma features are supported. [Prisma documentation can be found here](More information.

You can edit the Prisma schema at prisma/schema.prisma. After editing you can run

yarn migrate:save
yarn migrate:up

to create new migrations and run them against the database.

You should also run yarn generate to create updated type definitions for the Prisma client.