Commit 9144f306 authored by 이재연's avatar 이재연
Browse files

zz

parent df51efcd
...@@ -20,6 +20,8 @@ connectDb() ...@@ -20,6 +20,8 @@ connectDb()
const app = express(); const app = express();
app.use(express.json());
app.use(cors()) app.use(cors())
app.use(express.static(path.join(process.cwd(), 'dist'))) app.use(express.static(path.join(process.cwd(), 'dist')))
// app.use(bodyParser.urlencoded({ extended: true })) // app.use(bodyParser.urlencoded({ extended: true }))
......
...@@ -3,8 +3,10 @@ import isLength from 'validator/lib/isLength.js'; ...@@ -3,8 +3,10 @@ import isLength from 'validator/lib/isLength.js';
import bcrypt from 'bcryptjs'; import bcrypt from 'bcryptjs';
const signup = async (req, res) => { const signup = async (req, res) => {
console.log(req.body)
const { name, number1, number2, id, password, tel } = req.body const { name, number1, number2, id, password, tel } = req.body
console.log(req.body)
try { try {
if(!isLength(password,{min:8, max:15})){ if(!isLength(password,{min:8, max:15})){
return res.status(422).send('비밀번호는 8-15자리로 입력해주세요.') return res.status(422).send('비밀번호는 8-15자리로 입력해주세요.')
......
...@@ -6,7 +6,7 @@ const router = express.Router() ...@@ -6,7 +6,7 @@ const router = express.Router()
router.route('/login') router.route('/login')
.post(authCtrl.login) .post(authCtrl.login)
router.route('/logout') router.route('/logout')
.get(authCtrl.logout) .get(authCtrl.logout)
export default router export default router
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment