Giter Club home page Giter Club logo

mattnix4 / express-prisma-postgresql-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tuanlc/express-prisma-postgresql-boilerplate

0.0 1.0 0.0 11 KB

This boilerplate follows clean architecture with SOLID principles. This sample define a simple user schema and handle two endpoints that allows users to create new accounts and login by them. There is also a middleware to validate JWT tokens that are provided by clients with `Bearer` authorization header.

Shell 0.50% JavaScript 2.45% TypeScript 94.38% Dockerfile 2.66%

express-prisma-postgresql-boilerplate's Introduction

Boilerplate for express, postgresql, prisma and typescript

This boilerplate follows clean architecture with SOLID principles. This sample define a simple user schema and handle two endpoints that allows users to create new accounts and login by them. There is also a middleware to validate JWT tokens that are provided by clients with Bearer authorization header.

Technologies

  • Environment: Nodejs
  • Language: Typescript
  • Framework: Expressjs
  • ORM: Prisma
  • Database: Postgresql
  • Authentication: Basic, JWT
  • Inversion Of Control (D in SOLID): Awillix
  • Password hash library: bcryptjs

Prequisite

  • Create the .env file by copying the .env.example file
  • Database:
    • The easy way to have a Postgresql server is using docker or you can use Postgreql cloud
    • Once you have the database connection URL, replace the sample one in the .env file by yours
  • Install dependencies
npm install
  • Initialize database schema
npx prisma migrate dev --name "init" --preview-feature

Docker build

docker build -t app-name .

NPM scripts

  1. Run dev
npm run dev
  1. Linting
npm run lint
  1. Build
npm run build
  1. Run production
npm run start

express-prisma-postgresql-boilerplate's People

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.