Git Product home page Git Product logo

node-prisma-demo's Introduction

Prerequisite

You must have Node.js, PostgreSQL database installed in your system.

In order to edit the code make sure to install an JavaScript IDE like VS Code or your preffered one.

Install Dependencies

 npm i

Steps to perform before running the project

  1. Make sure npm i command is successfully executed.
  2. Make sure you have created a database named demo in your PostgreSQL.
  3. Create a .env file in root directory and make sure to update DATABASE_URL, JWT_SECRET and SENDGRID_API_KEY to ensure your application will run properly. You can copy contents from example.env to get started quickly.
  4. Once all above steps are complete go to the project root directory and run npx prisma generate this command in order to update the prisma client.
  5. Once Prisma client is setup run npx prisma migrate dev --preview-feature --skip-generate --name "init" this command to generate schema in your project which will generate SQL files, which you can use to create table structures into the system.
  6. Alternative to manually running SQL script you can run npx prisma db pull this command which will create table structures into the system.

Run App

In dev mode "npm run dev"

API Docs

You can access swagger documentation on this URL once your server is up and running.

  • Version 1.0.0
  • License MIT

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.