Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example REST API for PERN app

How to Run

  1. Install node modules with npm i.
  2. Ensure environment variables are configured correctly for your project in provided .env or create a .env.local and set values.

The next two steps are only necessary if you want to use Prisma. You can also write queries to your db manually in endpoints

  1. Pull database schema into schema.prisma with npx prisma db pull.
  2. Generate a new prisma client with npx prisma generate.
  3. Type npm start to start a local instance of the server. Launches on localhost:3001 by default.

Environment Variables

  • ENV: 'development' or 'production'
  • FRONTEND_URL: url of the client, used in Allow-Origin access control headers
  • DB_URL: connection string for database
  • SESSION_SECRET: user-defined secret string, used to encrypt and decrypt cookies with cookie-parser

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages