Commit 7bd4eef0 authored by Choi Ga Young's avatar Choi Ga Young
Browse files

xxxxxx

parent c4848cf1
import React, { useState } from 'react';
import { Button, Form, Container, Navbar } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import Menu from '../Components/Menu';
function LogIn() {
const [validated, setValidated] = useState(false);
......@@ -18,7 +17,9 @@ function LogIn() {
return (
<>
<Menu />
<Navbar bg="dark" variant="dark">
<Navbar.Brand>YDK Messenger</Navbar.Brand>
</Navbar>
<Form noValidate validated={validated} onSubmit={handleSubmit}>
<Container className="d-flex justify-content-center">
<div className="mt-5 p-5 shadow w-75">
......
import React, { useState } from 'react';
import { Button, Form, Container, Navbar } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import Menu from '../Components/Menu';
function SingUp() {
const [validated, setValidated] = useState(false);
......@@ -18,7 +18,9 @@ function SingUp() {
return (
<>
<Menu />
<Navbar bg="dark" variant="dark">
<Navbar.Brand>YDK Messenger</Navbar.Brand>
</Navbar>
<div>
<Form noValidate validated={validated} onSubmit={handleSubmit}>
......
import mongoose from 'mongoose'
const {String} = mongoose.Schema.Types
const ChatSchema = new mongoose.Schema({
room: {
type: ObjectId,
required: true,
ref:'Room',
},
nickname: {
type: String,
required: true,
ref:'USer',
},
chat: String,
},{
timestamps: true
})
export default mongoose.models.Chat || mongoose.model('Chat', ChatSchema)
//chat라는 이름이 있으면 앞을 return하고 없으면 뒤를 실행함
\ No newline at end of file
......@@ -4,7 +4,7 @@ import userCtrl from '../controllers/user.controller.js'
const router = express.Router()
//router의 역할 : './주소'부분을 처리하는 역할함.
router.route('/api/users/signup')
router.route('/signup')
.post(userCtrl.signup)
.get(userCtrl.hello)
......
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