๋ชฉ๋ก๐ฉ๐ป ๋ฐฑ์๋(Back-End) (156)
๐ ๊ณต๋ถํ๋ ์ง์ง์ํ์นด๋ ์ฒ์์ด์ง?

=> Node.js With Passport Authentication | Full Project => authentication app with login, register and access control using Node.js, Express, Passport, Mongoose ๐ฅ ํจ์ค์๋ ํด์ํจ์ bcrypt : hash ํจ์๋ฅผ ์ด์ฉํด ์ ๋ณด๋ฅผ ์ํธํ ํ ์ ์๋๋ก ํด์ฃผ๋ Node.js ํจํค์ง // bcrypt ๋ถ๋ฌ์ค๊ธฐ - commonjs const bcrypt = require("bcrypt") // ํด์ ํจ์๋ก ๋น๋ฐ๋ฒํธ ์ํธํํด์ ๋ณ์์ ์ ์ฅํ๊ธฐ const encrypted = bcrypt.hash("๋น๋ฐ๋ฒํธ", ํด์ํจ์ ๋ฐ๋ณต ํ์) ๐ฅ redirect ์ render ์ฐจ์ด res.redire..

=> Node.js With Passport Authentication | Full Project => authentication app with login, register and access control using Node.js, Express, Passport, Mongoose ๐ฅ DB์ ์ ์ฅํ User Schema & ํ์๊ฐ์ ์ ๊ท์น ์์งํค๋ฉด message ๋์ฐ๊ธฐ ๐ง models/User.js User schema ์์ฑ const mongoose = require("mongoose"); const UserSchema = new mongoose.Schema({ name: { type: String, required: true }, email: { type: String, required: tru..

=> Node.js With Passport Authentication | Full Project => authentication app with login, register and access control using Node.js, Express, Passport, Mongoose ๐ฅ ํ์๊ฐ์ DB ๋ฃ๊ธฐ ๐ง app.js const express = require("express"); const expressLayouts = require("express-ejs-layouts"); const mongoose = require("mongoose"); require("dotenv").config(); const app = express(); // DB config const db = process.env...

=> Node.js With Passport Authentication | Full Project => authentication app with login, register and access control using Node.js, Express, Passport, Mongoose ๐ฅ Dashboard ํ์ด์ง ๐ง views/dashboard.ejs Dashboard Welcome Logout ๐ฅ MongoDB ์ฐ๊ฒฐํ๊ธฐ ๐ง app.js const express = require("express"); const expressLayouts = require("express-ejs-layouts"); const mongoose = require("mongoose"); require("dotenv").conf..

=> Node.js With Passport Authentication | Full Project => authentication app with login, register and access control using Node.js, Express, Passport, Mongoose ๋ฐ๋ผํ๋ค๊ฐ bootstrap ์ ์ ์ฉ๋ผ์ ์ ๋ถ์ ๊นํ๋ธ ์ฐธ๊ณ ํจ.. ๐ฅ ๋ก๊ทธ์ธ & ํ์๊ฐ์ ํ์ด์ง ์์๊ฒ ๋ณ๊ฒฝํ๊ธฐ ๐ง app.js const express = require("express"); const expressLayouts = require("express-ejs-layouts"); const app = express(); // ejs ๋ฏธ๋ค์จ์ด app.use(expressLayouts); // express ์ vi..

=> Node.js With Passport Authentication | Full Project => authentication app with login, register and access control using Node.js, Express, Passport, Mongoose ๐ฅ ejs (Embedded JavaScript) : JavaScript๋ก HTML ๋งํฌ ์ ์ ์์ฑ ํ ์์๋ ๊ฐ๋จํ ํ ํ๋ฆฟ ์ธ์ด ( view๋ฅผ ๋์ ์ผ๋ก ์์ฑํ๋ ํ ํ๋ฆฟ ์ธ์ด ) ์ฐธ๊ณ => https://noodler.tistory.com/26 ํ๋ฆ ์ ์ด๋ฌธ ๋ณ์ ๊ฐ ์์ฝ์ด ๋ค๋ฅธ viewํ์ผ์ ๋ถ๋ฌ ์ด ๐ฅ ejs ์ฐธ๊ณ ์ฌ์ดํธ (bootstrap.min.css) https://bootswatch.com/ Bootswatch: ..

=> Node.js With Passport Authentication | Full Project => authentication app with login, register and access control using Node.js, Express, Passport, Mongoose ๐ฅ ํ๊ฒฝ ์ธํ : npm ์ ํตํด ์๋์ ํจํค์ง๋ฅผ ์ค์นํ๊ธฐ ๐ฅ ์๋ฒ ๋์ฐ๊ธฐ ๐ง app.js const express = require("express"); const app = express(); // Routes app.use("/", require("./routes/index")); app.use("/users", require("./routes/user")); const PORT = process.env.PORT ||..

=> CRUD App With Image Upload Using NodeJs, ExpressJs, MongoDB & EJS Templating Engine ๐ฅ user์ ํ๋กํ ๋ชฉ๋ก์ ์์ฑํ๊ณ ์์ ํ๊ณ ์ญ์ ํ๊ณ MongoDB์ ์ ์ฅํ๊ธฐ ์ฐธ๊ณ : https://github.com/gani0325/2023/tree/main/Web/ImageUpload ๐ง models/user.js const mongoose = require("mongoose"); const userSchema = new mongoose.Schema({ name: { type: String, required: true, }, email: { type: String, required: true, }, phone: { type: String, ..