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

=> Node.js, Express ๋ฐ MongoDB๋ฅผ ์ฌ์ฉํ์ฌ Markdown ๋ธ๋ก๊ทธ๋ฅผ ๊ตฌ์ถํ๋ ๋ฐฉ๋ฒ ๐ฅ๏ธ Create Index Route const express = require("express"); const app = express(); app.set("view engine", "ejs"); app.get("/", (req, res) => { res.render("index"); }); app.listen(3000); โก๏ธ Article index โก๏ธ New Article ๐ฅ๏ธ ํ์ ํจํค์ง ์ค์น npm install marked slugify โก๏ธ marked : ๋งํฌ๋ค์ด์ HTML๋ก ๋ณํํ๋ ํจํค์ง โก๏ธ slugify ์ฌ๋์ด ์ฝ์ ์ ์๋ ๊ณ ์ ์๋ณ์๋ก, ID์ ๊ฐ์ด ์ฌ๋์ด ์ฝ๊ธฐ ์ด๋ ค์ด ์..

=> Understanding Authentication in Node.js - Sessions &Cookies - Web Development Concepts ๐ฅ๏ธ Using Sessions & Cookies โก๏ธ ์ฟ ํค Cookie : ์น ์๋ฒ๊ฐ ๋ธ๋ผ์ฐ์ ์๊ฒ ์ง์ํ์ฌ ์ฌ์ฉ์์ ๋ก์ปฌ ์ปดํจํฐ์ ํ์ผ ๋๋ ๋ฉ๋ชจ๋ฆฌ์ ์ ์ฅํ๋ ์์ ๊ธฐ๋ก ์ ๋ณด ํ์ผ : ์ฟ ํค์ ๋ํ ์ ๋ณด๋ฅผ ๋งค ํค๋(Http Header) ์ ์ถ๊ฐํ์ฌ ๋ณด๋ด๊ธฐ ๋๋ฌธ์ ์๋นํ ํธ๋ํฝ์ ๋ฐ์ : ์ฟ ํค๊ฐ ์ ์ถ๋๋ฉด ๋ณด์์ ๋ํ ๋ฌธ์ ์ ๋ ๋ฐ์ Name ์ฟ ํค์ ์ด๋ฆ Value ์ฟ ํค์ ์ ์ฅ๋ ๊ฐ Expires ์ฟ ํค๊ฐ ์ธ์ ์ญ์ ๋๋์ง ๊ฒฐ์ Max-Age๋ฅผ ํตํด ์ง์ ๋ ๋ง๋ฃ์ผ์ด ๋๋ฉด ๋์คํฌ์์ ์ฟ ํค๊ฐ ์ ๊ฑฐ Domain ์ฟ ํค๊ฐ ์ฌ์ฉ๋๋ ๋๋ฉ์ธ์ ์ง์ ํ์ฌ ํ์ ์ค์ธ ..

=> Build a Zoom Clone with Node JS for Beginners ๐ ๊ฐ๋ฐ ํ๊ฒฝ ์ค์ npm init npm i express uuid ejs npm install -D nodemon ๐ package.json { "name": "zoomclone", "version": "1.0.0", "description": "- nodejs init - first view init - create a room id - add ability to view our own video - add ability to allow others to stream their video - add styling - add ability to create message - add mute button - add ..

=> Create a Discord Bot With Node.js ๐ ๊ฐ๋ฐ ํ๊ฒฝ ์ค์ npm init npm install -D nodemon npm i discord.js npm i dotenv ๐ package.json { "name": "discordbot", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "start": "node server.js", "dev": "nodemon server.js" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "nodemon": "^2.0.22" }, "dependencies": { "discord...

=> Node.js GeoJSON API & App | Store Locator ๐ ๊ฐ๋ฐ ํ๊ฒฝ ์ค์ npm init npm i express mongoose dotenv node-geocoder cors npm install -D nodemon ๐ package.json { "name": "storelocationapi", "version": "1.0.0", "description": "", "main": "server.js", "scripts": { "start": "node server.js", "dev": "nodemon server.js" }, "author": "", "license": "ISC", "dependencies": { "cors": "^2.8.5", "dotenv": "^16.2.0..

=> Realtime Chat With Users & Rooms - Socket.io, Node & Express ๐ 1) Front-End ์ฝ๋ ํ์ผ ๋ณต๋ถํ๊ธฐ https://github.com/bradtraversy/chatcord/tree/master/public ๐ 2) ํ๊ฒฝ์ค์ npm init npm install express socket.io moment npm install -D nodemon ๐ package.json { "name": "realtimechat", "version": "1.0.0", "description": "realtime chat app with rooms", "main": "index.js", "scripts": { "start": "node server", "dev..

=> ํ๋ก ํธ์์ ์๋ฒ์ ๋ฐ์ดํฐ ์์ฒญํ๋ ๋ฐฉ๋ฒ (React๋ก fetch, axios ์ฌ์ฉํ๊ธฐ) ๐ SERVER const express = require("express"); const app = express(); // body-parser app.use(express.json()); app.use(express.urlencoded({ extended: true })); // ๋ฐ์ดํฐ๋ฅผ ์๋ฒ์ ์ ์ฅํด๋์ (๋ฐ์ดํฐ๋ฒ ์ด์ค ์๋ต) let id = 2; const todoList = [ { id: 1, text: "ํ ์ผ 1", done: false, }, ]; app.get("/", function (res, res) { res.send("server"); }); // todolist ์กฐํ app.get("/ap..

=> Node+Express ์๋ฒ์ React ์ฐ๋ํ๋ ค๋ฉด ๐ react์ node ์ฐ๋ํ๊ธฐ 1) react : HTML์ ์ด์๊ฒ ๋ง๋ค์ด์ฃผ๋ ํด - npx create-react-app react-project - App.js ๋ง๋ค๊ณ ๊ฐ๋ฐํ๊ธฐ npm run start - ๊ฐ๋ฐ ๋๋๋ค๋ฉด -> npm run build - -> html ํ์ผ (main page) ์ด ์์ฑ 2) node - server.js ๋ง๋ค๊ธฐ - npm init -y - npm install express nodemon cors - server ์คํํ๊ธฐ -> nodemon server.js 3) db ๋ฐ์ดํฐ๋ฅผ ์๋ฒ๋ฅผ ํตํด react๋ก ๋ณด๋ด๊ธฐ - ๋ฐ์ ๋ฐ์ดํฐ๋ก react๊ฐ html ์์ฑํ๊ธฐ - html ์ ์๋ฒ๊ฐ ๋ง๋ค๋ฉด server-side..