GithubHelp home page GithubHelp logo

nestcrud's Introduction

NestJS Prisma PostgreSQL TypeORM Docker

A Backend application based on NestJS, where PostgreSQL acts as a database, to control the base used Prisma. Also Using passport.js, and json web tokens (JWT). There is also e2e tests in the tests folder. You can running Database from Docker ๐Ÿฌ And you can run a second database for tests. In file package.json there is a command for this.

NestJS
NestJS
PostgresSQL
PostgresSQL
Docker
Docker
Prisma
Prisma

Key Features

  • Authentication and Authorization
    • Sign Up
    • Login
  • Bookmarks
    • User can create a bookmarks
    • Create bookmarks, get, update, delete.
  • User
    • Create user, update and change password.

API Usage

Check Bookmarks API Documentation for more info.๐Ÿ“— In postman create a global variable jwt for token, and in test write this code: In the authorization section, select the type of token "Bearer Token" and write a variable {{jwt}}. It will automatically refresh the token.

const token = pm.response.json().tokens.access;
pm.globals.set("jwt", token);

Installation and launch method

Stars the Prisma

To start the Prisma run this command

$ npx prisma generate

You can also run Prisma Studio, by default Prisma run on localhost:5555

$ npx prisma studio

In file .env enter your environment variables

Using Docker

Follow the command:

docker-compose up
# -d - For launch in the background
# --build - for build containers

Without Docker

  • Install postgreSQL with an official site
  • Create a server copy and database, add the user and password as indicated in the .env file
  • Make sure PostgreSQL is launched and works
  • Install dependencies

Shell command

# yarn package manager
yarn install
yarn start

# npm package manager
npm install
npm run start

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.