NestJs Course for Beginners - Create a REST API

freeCodeCamp.org · 2M views · 2022 · 3:42:09

Open on YouTube

Web developmentSoftware architecture & designcourse

Why Stack Overflow recommends it

Stack Overflow users link it as the tutorial they were following when they hit Prisma, Docker or database connection errors in their NestJS projects.

Recommended by 0 people across 0 different months, 2022 to 2024.

What it is

A 3h42m freeCodeCamp course by Vladimir Agaev that builds a bookmarks CRUD REST API from scratch with NestJS, Docker, Postgres, Prisma, Passport JWT auth, Pactum end-to-end tests and dotenv config. It is a long, follow-along coding tutorial with chapter timestamps and a public GitHub repo.

What people said

Cites 0mega · 2022-03 · Stack Overflow · on “Unable to reach the database server using Prisma, Docker and NestJS”

I'm following a tutorial [this video] on NestJS and it uses Docker to deploy the database (locally). I'm totally new with Docker by the way. As an ORM, it uses Prisma. My Docker container launches, "ready to accept connections", but when I do npx prisma migrate dev , it returns -> Error: P1001: Can't reach database server at localhost : 5434 Please make sure your database server is running at localhost : 5434 . Here's the DATABASE_URL situated in a .env file (I added the connect_timeout after some searches on internet but it didn't solve the problem) : DATABASE_URL="postgresql://postgres:123@localhost:5434/nest?schema=public?connect_timeout=300" Here's my docker-compose.yml : docker-compose.yml [

Cites user17817361 · 2022-11 · Stack Overflow · on “Nest js Prisma Serverless Prisma Cannot find module './prisma/client/index'”

Please forgive my dumbness, I am new to the concept and stackoverflow community. I have been following tutorial from freeCodeCamp's NestJs Course for Beginner. [this video] And I have been try to use serverless framework to deploy. Whenever I request to endpoints, I I get the error of Import Module Error: Prisma Cannot find module './prisma/client/index'. generator client { provider = "prisma-client-js" } datasource db { provider = "mysql" url = env("DATABASE_URL") } My prisma code is : [LINK] import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { PrismaClient } from '@prisma/client'; @Injectable() export class PrismaService extends PrismaClient { co

Cites El-Baraa Radwan · 2024-10 · Stack Overflow · on “Prisma Error: P1017: Server has closed the connection”

I'm following a course, here is the link [this video] halfway through the course he started testing the code but made another database connection and created a new .env name it .env.test in .env PORT=3002 JWT_SECRET=secret DB_USERNAME=root DB_PASSWORD=MySQL.Bebon3232 DB_HOST=db_test DB_NAME=learning_nestjs DATABASE_URL="mysql://root:MySQL.Bebon3232@localhost:3307/learning_nestjs" in .env.test PORT=3002 JWT_SECRET=secret DB_USERNAME=root DB_PASSWORD=MySQL.Bebon3232 DB_HOST=db_test DB_NAME=learning_nestjs DATABASE_URL="mysql://root:MySQL.Bebon3232@localhost:3308/learning_nestjs" the only difference is the port number while in docker-compose version: '3.8' services: dev_db: image: mysql:latest resta