Giter Club home page Giter Club logo

express-prisma's Introduction

Express Prisma

Simple CRUD API with Express JS, Prisma ORM and PostgreSQL Database

Running on Localhost

  • Clone this repository
git clone https://github.com/armandwipangestu/express-prisma
  • Install dependency
cd express-prisma && pnpm install
  • Create .env file
cp .env.development .env

NOTE: Fill DATABASE_URL with your database postgres, for example

DATABASE_URL=postgresql://USER:PASSWORD@HOSTNAME:PORT/DBNAME

Running Prisma Studio

  • Run this command to run Prisma Studio
pnpm dlx prisma studio

Open your web browser with url localhost:5555, it will show like this

image

NOTE: If you add or edit file schema.prisma then you need to run this (to regenerate the schema)

pnpm dlx prisma generate && pnpm dlx prisma db push

Structure Folder

 .
├──  node_modules
├──  package.json
├──  pnpm-lock.yaml
├──  prisma
│   └──  schema.prisma
├──  README.md
└──  src
    ├──  db
    │   └──  index.js
    ├──  index.js
    └──  product
        ├──  product.controller.js
        ├──  product.repository.js
        └──  product.service.js

Endpoint

Endpoint Method
/products GET
/products/:id GET
/products POST
/products/:id DELETE
/products/:id PUT
/products/:id PATCH

express-prisma's People

Contributors

armandwipangestu avatar

Stargazers

 avatar

Watchers

 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.