Coder Social home page Coder Social logo

michalzalobny / fastify-prisma-postgresql Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 358 KB

REST app built with Fastify, Prisma & TypeScript

Home Page: https://fastify-prisma-postgresql.michalzalobny.com/documentation/

TypeScript 97.02% JavaScript 2.98%

fastify-prisma-postgresql's Introduction

fastify-prisma-postgresql

REST app built with Fastify, Prisma & TypeScript

Init prisma client

npx prisma generate

Migrate the schema in development

npx prisma migrate dev --name init

Migrate schema in production

npx prisma migrate deploy

Reset db

npx prisma migrate reset

Studio

npx prisma studio

Swagger docs at:

/documentation

env variables

  • DATABASE_URL="" - postgresql database url
  • COOKIE_KEY="" - cookie key for session, 32 bytes
  • PORT="3002" - port for server
  • SHADOW_DATABASE_URL=" - postgresql database url for shadow database (only for development! should be different from DATABASE_URL)
  • FRONTEND_URL=" - frontend url for CORS. For example : http://localhost:3000

To build a project in production use

npm run generate-prisma-and-migrate-and-build

Use prettier on all files

npx prettier --write .

Structure partially based on

https://www.youtube.com/watch?v=LMoMHP44-xM

fastify-prisma-postgresql's People

Contributors

michalzalobny avatar

Stargazers

Elijah Montenegro avatar sagar regmi avatar arpu avatar

Watchers

arpu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.