yunhwan19037701
@yunhwan19037701
Reviews Written
-
Average Rating
-
Posts
Q&A
movieimage๊ฐ ์๋จ๋ค์...
์ ๋ ๊ฐ์ ๋ฌธ์ ๋ฅผ ๊ฒช์์ต๋๋ค. ๊ฐ์ฌํฉ๋๋ค.
- Likes
- 8
- Comments
- 5
- Viewcount
- 459
Q&A
์๋ ํ์ธ์ ์ ์๋!
๋ผ์ฐํฐ ๋ถ๋ถ ์ฝ๋๋ ์ถ๊ฐํ์ต๋๋ค!
- Likes
- 0
- Comments
- 5
- Viewcount
- 361
Q&A
์๋ ํ์ธ์ ์ ์๋!
const express = require('express'); const db = require('./models'); const cors = require('cors'); const app = express(); db.sequelize.sync(); app.use(express.json()); app.use(cors({ origin: 'http://localhost:3000', credentials: true, })); app.get('/', (req, res) => { res.send('hello backend') }) app.post('/user', async (req, res, next) => { try { console.log(req.body) const newUser = await db.User.create({ where: { email : req.body.email, password : req.body.password, nickname : req.body.nickname, } }); res.status(201).json(newUser); } catch (err) { console.log(err); next(err); } }) app.listen(3085, () => { console.log('backend server on ${3085} port') })
- Likes
- 0
- Comments
- 5
- Viewcount
- 361
Q&A
์๋ ํ์ธ์ ์ ์๋!
(์ฌ์ง) ์ํฌ๋ฒค์น์์๋ ํ ์ด๋ธ์ด ๋ณด์ด์ง ์์ต๋๋ค!
- Likes
- 0
- Comments
- 5
- Viewcount
- 361
Q&A
์๋ ํ์ธ์ ์ ์๋!
์๋ ํ์ธ์ ์ ์๋ violation error ๋ ํด๊ฒฐ์ ํ๋๋ฐ์ ใ ! (์ฌ์ง) ์ด๋ ๊ฒ body๋ ์ ๋ค์ด๊ฐ ๊ฒ์ ํ์ธํ์ผ๋ (์ฌ์ง) mysql ์์๋ null๋ก ๋ค์ด๊ฐ์๋ค์ ์์ธ์ ์ ์ ์์๊น์~? ์คํค๋ง ์ ์ํ๋ ๋ถ๋ถ ์ฝ๋์ ๋๋ค. module.exports = (sequelize, DataTypes) => { const User = sequelize.define('User', { email: { type: DataTypes.STRING(40), // 40์ ์ด๋ด unique: false, // ์ค๋ณต๊ธ์ง }, nickname: { type: DataTypes.STRING(20), unique: false, // ์ค๋ณต๊ธ์ง }, password: { type: DataTypes.STRING(100), unique: false, // ์ค๋ณต๊ธ์ง }, }, { charset: 'utf8', collate: 'utf8_general_ci', // ํ๊ธ ์ ์ฅ๋ผ์ }); User.associate = (db) => { // db.User.hasMany(db.Post); // db.User.hasMany(db.Comment); }; return User; };
- Likes
- 0
- Comments
- 5
- Viewcount
- 361
Q&A
back/config/config.json ํจ์ค์๋์ ๋ํด ๊ถ๊ธํฉ๋๋ค. SequelizeAccessDeniedError: Access denied for user 'root'@'localhost' (using password: NO)
ํน์ ๋ช๋ฒ์งธ ๊ฐ์์์ mysql DB ๋น๋ฐ๋ฒํธ ์ค์ ํ๋ ๋ถ๋ถ์ด ์์๋์ง ์ ์ ์์๊น์ ใ ? [ํด๊ฒฐ์๋ฃ] ์๋ ๋ฐฉ์์ผ๋ก ํด๊ฒฐํ์ต๋๋ค! ๋ค๋ฅธ ๋ถ๋ค๋ ์ฐธ๊ณ ํ์๊ธธ.. mysql ์ค์น๋ฒ https://velog.io/@wow/Mac์์-mySQL5.7-์ฌ์ค์น mysql ์ด๊ธฐ ๋น๋ฐ๋ฒํธ ์ค์ ๋ฒ https://kogun82.tistory.com/122
- Likes
- 0
- Comments
- 3
- Viewcount
- 402
Q&A
back/config/config.json ํจ์ค์๋์ ๋ํด ๊ถ๊ธํฉ๋๋ค. SequelizeAccessDeniedError: Access denied for user 'root'@'localhost' (using password: NO)
(์ฌ์ง) ์๋ฌ ๋ด์ญ ์ฒจ๋ถํฉ๋๋ค !
- Likes
- 0
- Comments
- 3
- Viewcount
- 402
Q&A
pending status
return ์ ํ์์ฌ์ผํ๋ ๊ฒ์ผ๊น์?
- Likes
- 0
- Comments
- 3
- Viewcount
- 1.3K
Q&A
pending status
app.post ์์ res.send()๋ฅผ ๋ฃ์ผ๋๊น ํด๊ฒฐ์ด ๋์์ต๋๋ค!
- Likes
- 0
- Comments
- 3
- Viewcount
- 1.3K
Q&A
pending status
app.post('/user', (req, res) => { req.body.email; req.body.password; req.body.nickname; return res.send(); })
- Likes
- 0
- Comments
- 3
- Viewcount
- 1.3K




