Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wpcodevo/node_prisma_postgresql
In this comprehensive article, you'll learn how to set up a Node.js API Project with ExpressJs, Prisma, PostgreSQL, Redis, and Docker-compose. The API will run on an Express server and use Postgres for data storage.
https://github.com/wpcodevo/node_prisma_postgresql
nodejs nodemailer postgresql pug typescript
Last synced: 28 days ago
JSON representation
In this comprehensive article, you'll learn how to set up a Node.js API Project with ExpressJs, Prisma, PostgreSQL, Redis, and Docker-compose. The API will run on an Express server and use Postgres for data storage.
- Host: GitHub
- URL: https://github.com/wpcodevo/node_prisma_postgresql
- Owner: wpcodevo
- Created: 2022-05-17T13:38:15.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-15T14:18:14.000Z (9 months ago)
- Last Synced: 2024-10-01T06:36:04.828Z (about 1 month ago)
- Topics: nodejs, nodemailer, postgresql, pug, typescript
- Language: TypeScript
- Homepage: https://codevoweb.com/crud-api-node-js-and-postgresql-send-html-emails
- Size: 109 KB
- Stars: 66
- Watchers: 3
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: readMe.md
Awesome Lists containing this project
README
# Node.js API with Prisma, TypeScript, and PostgreSQL
## Setup Node.js API with Prisma, TypeScript, and PostgreSQL
![Setup Node.js API with Prisma, TypeScript, and PostgreSQL](https://codevoweb.com/wp-content/uploads/2022/05/API-Node.js-TypeScript-Prisma-PostgreSQL-Project-Setup.webp)
In this comprehensive article, you'll learn how to set up a Node.js API Project with ExpressJs, Prisma, PostgreSQL, Redis, and Docker-compose. The API will run on an Express server and use Postgres for data storage.
### Topics Covered
- Initialize a Prisma Project with Express.js
- Generate a database schema with the Prisma CLI
- Defining the User Model with Prisma
- Database Migration with Prisma
- Connect the ExpressJs App to the Redis Server
- Connecting to PostgreSQL and Redis with MySQL VS Code ExtensionRead the entire article here: [https://codevoweb.com/api-node-typescript-prisma-postgresql-project-setup](https://codevoweb.com/api-node-typescript-prisma-postgresql-project-setup)
## Node.js + Prisma + PostgreSQL: Access & Refresh Tokens
![Node.js + Prisma + PostgreSQL: Access & Refresh Tokens](https://codevoweb.com/wp-content/uploads/2022/05/Node.js-Prisma-PostgreSQL-Access-Refresh-Tokens.webp)
In this comprehensive article, you'll learn how to set up a Node.js API Project with ExpressJs, Prisma, PostgreSQL, Redis, and Docker-compose. The API will run on an Express server and use Postgres for data storage.
### Topics Covered
- JWT Authentication Example with Node.js, Prisma, and PostgreSQL
- User Login and Registration Flow with JSON Web Tokens
- Create the User Model with Prisma
- Create Validation Schemas with Zod
- Create Middleware to Parse Zod Schema
- Password Management with Bcryptjs
- Create Services to Interact with the Database
- Authentication with JSON Web Tokens (JWT)
- Create Authentication Controllers
- Create User Controller
- Create Authentication Middleware
- Create Authentication Routes
- Create User Routes
- Add the Routes to the Middleware Stack
- Database Migration with Prisma
- Testing the JSON Web Token Authentication REST APIRead the entire article here: [https://codevoweb.com/node-prisma-postgresql-access-refresh-tokens](https://codevoweb.com/node-prisma-postgresql-access-refresh-tokens)
## CRUD API with Node.js and PostgreSQL: Send HTML Emails
![CRUD API with Node.js and PostgreSQL: Send HTML Emails](https://codevoweb.com/wp-content/uploads/2022/05/CRUD-API-with-Node.js-and-PostgreSQL-Send-HTML-Emails.webp)
In this article, you'll learn how to send HTML Emails with Node.js, Nodemailer, Prisma, PostgreSQL, Express, and Docker-compose. We'll create a generic class that can be used to send single or multiple emails at once by chaining the methods together.
### Topics Covered
- Send Emails with Node.js, Nodemailer, Prisma Overview
- Setting up ExpressJs Templating Engine with Pug
- Create a Utility Class to the Send Emails
- Get the Nodemailer Credentials
- Define the Email Class Attributes
- Create a Nodemailer Transporter
- Create a Method to Generate the Email Templates
- Create a Method to Send the Emails
- Creating the Email Templates with Pug
- Run Prisma Migration to Update PostgreSQL Schema
- Update the User Registration Controller to Send the Emails
- Create a Route Handler to Verify the Email
- Update the Login ControllerRead the entire article here: [https://codevoweb.com/crud-api-node-js-and-postgresql-send-html-emails](https://codevoweb.com/crud-api-node-js-and-postgresql-send-html-emails)
## API with Node.js, Prisma & PostgreSQL: Forget/Reset Password
![API with Node.js, Prisma & PostgreSQL: Forget/Reset Password](https://codevoweb.com/wp-content/uploads/2022/05/API-with-Node.js-Prisma-PostgreSQL-Forget-Reset-Password.webp)
In this article, you'll learn how to implement forget/reset passwords with Node.js, Prisma, PostgreSQL, Nodemailer, Redis, Docker-compose, and Pug. Also, you will learn how to dynamically generate HTML Email templates with Pug and send them via SMTP to the user's Email inbox.
### Topics Covered
- Forget/Reset Password Flow in Node.js
- Update the Prisma User Model
- Run the Prisma Migration Command to Update the Database
- Update the Zod User Schema
- Create Services to Query and Mutate the Database
- Create a Utility Class to Send Emails
- Create Controllers
- Forgot Password Controller
- Create the Password Reset Controller
- Add the Routes to the Middleware PipelineRead the entire article here: [https://codevoweb.com/crud-api-node-prisma-postgresql-reset-password](https://codevoweb.com/crud-api-node-prisma-postgresql-reset-password)