고병후

Merge branch 'master' of http://khuhub.khu.ac.kr/2019102198/Tunnel into server

This diff is collapsed. Click to expand it.
...@@ -3,14 +3,23 @@ ...@@ -3,14 +3,23 @@
3 "version": "0.1.0", 3 "version": "0.1.0",
4 "private": true, 4 "private": true,
5 "dependencies": { 5 "dependencies": {
6 + "@ckeditor/ckeditor5-build-classic": "^31.0.0",
7 + "@ckeditor/ckeditor5-react": "^3.0.3",
6 "@testing-library/jest-dom": "^5.15.0", 8 "@testing-library/jest-dom": "^5.15.0",
7 "@testing-library/react": "^11.2.7", 9 "@testing-library/react": "^11.2.7",
8 "@testing-library/user-event": "^12.8.3", 10 "@testing-library/user-event": "^12.8.3",
11 + "axios": "^0.24.0",
12 + "http-proxy-middleware": "^2.0.1",
9 "node-sass": "^6.0.1", 13 "node-sass": "^6.0.1",
10 "react": "^17.0.2", 14 "react": "^17.0.2",
11 "react-dom": "^17.0.2", 15 "react-dom": "^17.0.2",
16 + "react-redux": "^7.2.6",
12 "react-router-dom": "^6.0.2", 17 "react-router-dom": "^6.0.2",
13 "react-scripts": "4.0.3", 18 "react-scripts": "4.0.3",
19 + "redux": "^4.1.2",
20 + "redux-promise": "^0.6.0",
21 + "redux-promise-middleware": "^6.1.2",
22 + "redux-thunk": "^2.4.1",
14 "semantic-ui-css": "^2.4.1", 23 "semantic-ui-css": "^2.4.1",
15 "semantic-ui-react": "^2.0.4", 24 "semantic-ui-react": "^2.0.4",
16 "web-vitals": "^1.1.2" 25 "web-vitals": "^1.1.2"
......
...@@ -9,21 +9,6 @@ ...@@ -9,21 +9,6 @@
9 name="description" 9 name="description"
10 content="Web site created using create-react-app" 10 content="Web site created using create-react-app"
11 /> 11 />
12 - <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13 - <!--
14 - manifest.json provides metadata used when your web app is installed on a
15 - user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16 - -->
17 - <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18 - <!--
19 - Notice the use of %PUBLIC_URL% in the tags above.
20 - It will be replaced with the URL of the `public` folder during the build.
21 - Only files inside the `public` folder can be referenced from the HTML.
22 -
23 - Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24 - work correctly both with client-side routing and a non-root public URL.
25 - Learn how to configure a non-root public URL by running `npm run build`.
26 - -->
27 <title>React App</title> 12 <title>React App</title>
28 </head> 13 </head>
29 <body> 14 <body>
......
1 -{
2 - "short_name": "React App",
3 - "name": "Create React App Sample",
4 - "icons": [
5 - {
6 - "src": "favicon.ico",
7 - "sizes": "64x64 32x32 24x24 16x16",
8 - "type": "image/x-icon"
9 - },
10 - {
11 - "src": "logo192.png",
12 - "type": "image/png",
13 - "sizes": "192x192"
14 - },
15 - {
16 - "src": "logo512.png",
17 - "type": "image/png",
18 - "sizes": "512x512"
19 - }
20 - ],
21 - "start_url": ".",
22 - "display": "standalone",
23 - "theme_color": "#000000",
24 - "background_color": "#ffffff"
25 -}
1 -//import React, {useState} from "react"; 1 +import {BrowserRouter as Router, Route, Routes} from "react-router-dom";
2 -import {BrowserRouter as Router, Route, Routes, Link} from "react-router-dom"; 2 +import MainPage from "./component/views/MainPage/MainPage";
3 -import MainPage from "./component/views/LandingPage/MainPage";
4 import LoginPage from "./component/views/LoginPage/LoginPage"; 3 import LoginPage from "./component/views/LoginPage/LoginPage";
5 import RegisterPage from "./component/views/RegisterPage/RegisterPage"; 4 import RegisterPage from "./component/views/RegisterPage/RegisterPage";
6 import "./static/fonts/font.css"; 5 import "./static/fonts/font.css";
6 +import LandingPage from "./component/views/LandingPage/LandingPage";
7 +
7 function App () { 8 function App () {
8 return ( 9 return (
9 <Router> 10 <Router>
10 <div> 11 <div>
11 - {}
12 <Routes> 12 <Routes>
13 - <Route exact path = "/main" element={<MainPage/>}/> 13 + <Route exact path = "/" element={<LandingPage/>}/>
14 - <Route exact path = "/login" element={<LoginPage/>}/> 14 + <Route exact path = "/login" element={<LoginPage/>}/>
15 - <Route exact path = "/register" element={<RegisterPage/>}/> 15 + <Route exact path = "/main" element={<MainPage/>}/>
16 + <Route exact path = "/register" element={<RegisterPage/>}/>
16 </Routes> 17 </Routes>
17 </div> 18 </div>
18 </Router> 19 </Router>
......
1 +export const LOGIN_USER = "login_user";
2 +export const REGISTER_USER = "register_user";
...\ No newline at end of file ...\ No newline at end of file
1 +import Axios from 'axios';
2 +import { LOGIN_USER, REGISTER_USER } from './types';
3 +
4 +export function loginUser(dataToSubmit) {
5 +
6 + const request = Axios.post('/api/users/login', dataToSubmit)
7 + .then( response => response.data )
8 + return {
9 + type: LOGIN_USER,
10 + payload: request
11 + }
12 +}
13 +
14 +export function registerUser(dataToSubmit) {
15 +
16 + const request = Axios.post('/api/users/register', dataToSubmit)
17 + .then( response => response.data )
18 + return {
19 + type: REGISTER_USER,
20 + payload: request
21 + }
22 +}
...\ No newline at end of file ...\ No newline at end of file
1 +import { combineReducers } from 'redux';
2 +import user from './user_reducer';
3 +
4 +const rootReducer = combineReducers({
5 + user
6 +})
7 +
8 +export default rootReducer;
1 +import {
2 + LOGIN_USER, REGISTER_USER
3 +} from '../_actions/types';
4 +
5 +export default function (state = {}, action) {
6 + switch (action.type) {
7 + case LOGIN_USER:
8 + return { ...state, loginSuccess: action.payload }
9 + break;
10 + case REGISTER_USER:
11 + return {...state, registerSuccess: action.payload}
12 + break;
13 + default:
14 + return state;
15 + }
16 +}
...\ No newline at end of file ...\ No newline at end of file
1 +import React from 'react'
2 +//import axios from 'axios'
3 +// import { response } from 'express'
4 +
5 +function LandingPage() {
6 +
7 + // useEffect(() => {
8 + // axios.get('/api/hello')
9 + // .then(response => console.log(response.data))
10 + // }, [])
11 +
12 + return (
13 + <div>
14 + LandingPage
15 + </div>
16 + )
17 +}
18 +
19 +export default LandingPage
20 +
1 -import React, { useState } from "react"; 1 +import React, {useState} from "react";
2 import "../style/LoginPage.scss"; 2 import "../style/LoginPage.scss";
3 import { Icon, Input } from "semantic-ui-react" 3 import { Icon, Input } from "semantic-ui-react"
4 import { useNavigate } from "react-router-dom"; 4 import { useNavigate } from "react-router-dom";
5 +import {useDispatch} from "react-redux";
6 +import { loginUser } from '../../../_actions/user_action'
5 7
6 -function LoginPage() { 8 +function LoginPage(props) {
9 + const dispatch = useDispatch();
7 const navigate = useNavigate(); 10 const navigate = useNavigate();
8 11
9 - const [Email, setEmail] = useState(""); 12 + const [Id, setId] = useState("");
10 const [Password, setPassword] = useState(""); 13 const [Password, setPassword] = useState("");
11 14
12 const onIdHandler = (event) => { 15 const onIdHandler = (event) => {
13 - setEmail(event.currentTarget.value); 16 + setId(event.currentTarget.value);
14 }; 17 };
15 const onPasswordHandler = (event) => { 18 const onPasswordHandler = (event) => {
16 setPassword(event.currentTarget.value); 19 setPassword(event.currentTarget.value);
17 }; 20 };
18 const onSubmitHandler = (event) => { 21 const onSubmitHandler = (event) => {
19 event.preventDefault(); 22 event.preventDefault();
20 - console.log("Email", Email); 23 + console.log("ID", Id);
21 console.log("Password", Password); 24 console.log("Password", Password);
25 + let body = {
26 + email: Id,
27 + password: Password
28 + }
29 + dispatch(loginUser(body))
30 + .then(response => {
31 + if (response.payload.loginSuccess) {
32 + props.history.push('/main')
33 + }
34 + else{
35 + alert('Error')
36 + }
37 + })
38 +
22 }; 39 };
23 40
24 const goToRegister = () => { 41 const goToRegister = () => {
25 navigate('/register'); 42 navigate('/register');
26 } 43 }
27 -
28 return ( 44 return (
29 <div id="body"> 45 <div id="body">
30 <div className="login-form"> 46 <div className="login-form">
...@@ -34,9 +50,9 @@ function LoginPage() { ...@@ -34,9 +50,9 @@ function LoginPage() {
34 <Input 50 <Input
35 icon={<Icon name='at'/>} 51 icon={<Icon name='at'/>}
36 iconPosition='left' 52 iconPosition='left'
37 - placeholder="Email" 53 + placeholder="ID"
38 type="text" 54 type="text"
39 - value={Email} 55 + value={Id}
40 autoComplete="off" 56 autoComplete="off"
41 onChange={onIdHandler}/> 57 onChange={onIdHandler}/>
42 </div> 58 </div>
......
1 -import {Button, Grid, Image, Segment} from "semantic-ui-react" 1 +import {Button} from "semantic-ui-react"
2 import "../style/MainPage.scss"; 2 import "../style/MainPage.scss";
3 +import { useNavigate } from "react-router-dom";
4 +import { CKEditor } from '@ckeditor/ckeditor5-react';
5 +import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
6 +
3 function MainPage() { 7 function MainPage() {
8 + const navigate = useNavigate();
9 + const goToLogin = () =>{
10 + navigate('/login');
11 + }
4 return ( 12 return (
5 <div id="Main"> 13 <div id="Main">
6 <div className="Main-header"> 14 <div className="Main-header">
...@@ -8,7 +16,7 @@ function MainPage() { ...@@ -8,7 +16,7 @@ function MainPage() {
8 <h1>Tunnel</h1> 16 <h1>Tunnel</h1>
9 </div> 17 </div>
10 <div className="None-title"> 18 <div className="None-title">
11 - <Button className="ui right floated button"> 19 + <Button className="ui right floated button" onClick={()=>goToLogin()}>
12 Logout 20 Logout
13 </Button> 21 </Button>
14 </div> 22 </div>
...@@ -26,7 +34,24 @@ function MainPage() { ...@@ -26,7 +34,24 @@ function MainPage() {
26 </div> 34 </div>
27 <div className="contents"> 35 <div className="contents">
28 <div className="ui segment"> 36 <div className="ui segment">
29 - <p>a</p> 37 + <CKEditor
38 + editor={ClassicEditor}
39 + data="<p>Hello from CKEditor 5!</p>"
40 + onReady={editor => {
41 + // You can store the "editor" and use when it is needed.
42 + console.log('Editor is ready to use!', editor);
43 + }}
44 + onChange={(event, editor) => {
45 + const data = editor.getData();
46 + console.log({ event, editor, data });
47 + }}
48 + onBlur={(event, editor) => {
49 + console.log('Blur.', editor);
50 + }}
51 + onFocus={(event, editor) => {
52 + console.log('Focus.', editor);
53 + }}
54 + />
30 </div> 55 </div>
31 <div className="ui segment"> 56 <div className="ui segment">
32 <p>a</p> 57 <p>a</p>
...@@ -45,7 +70,7 @@ function MainPage() { ...@@ -45,7 +70,7 @@ function MainPage() {
45 tabIndex="0"> 70 tabIndex="0">
46 <div className="visible content">도착한 </div> 71 <div className="visible content">도착한 </div>
47 <div className="hidden content"> 72 <div className="hidden content">
48 - <i className="pencil alternate icon"></i> 73 + <i className="paper plane ic on"></i>
49 </div> 74 </div>
50 </Button> 75 </Button>
51 </div> 76 </div>
......
1 -import React, {useCallback, useState} from "react"; 1 +import React, {useState} from "react";
2 import "../style/RegisterPage.scss"; 2 import "../style/RegisterPage.scss";
3 -import { Form, Message, Button, Icon, Input } from "semantic-ui-react"; 3 +import { Button, Icon, Input } from "semantic-ui-react";
4 -import backgroundImg from "../images/register_background.png"; 4 +import {useDispatch} from "react-redux";
5 +import { registerUser } from '../../../_actions/user_action'
5 6
6 -function RegisterPage() { 7 +function RegisterPage(props) {
7 - const [Email, setEmail] = useState(""); 8 + const dispatch = useDispatch();
9 + const [Id, setId] = useState("");
8 const [Password, setPassword] = useState(""); 10 const [Password, setPassword] = useState("");
9 const [PasswordCheck,setPasswordCheck] = useState(""); 11 const [PasswordCheck,setPasswordCheck] = useState("");
10 const [Personality, setPersonality] = useState(""); 12 const [Personality, setPersonality] = useState("");
11 - const [PasswordError,setPasswordError] = useState(false);
12 13
13 const onIdHandler = (event) => { 14 const onIdHandler = (event) => {
14 - setEmail(event.currentTarget.value); 15 + setId(event.currentTarget.value);
15 }; 16 };
16 const onPasswordHandler = (event) => { 17 const onPasswordHandler = (event) => {
17 setPassword(event.currentTarget.value); 18 setPassword(event.currentTarget.value);
...@@ -19,22 +20,32 @@ function RegisterPage() { ...@@ -19,22 +20,32 @@ function RegisterPage() {
19 const onPersonalityHandler = (event) => { 20 const onPersonalityHandler = (event) => {
20 setPersonality(event.currentTarget.value); 21 setPersonality(event.currentTarget.value);
21 }; 22 };
22 - const onPasswordChkHandler = useCallback((event) => { 23 + const onPasswordChkHandler = (event) => {
23 //비밀번호를 입력할때마다 password 를 검증하는 함수 24 //비밀번호를 입력할때마다 password 를 검증하는 함수
24 setPasswordCheck(event.currentTarget.value); 25 setPasswordCheck(event.currentTarget.value);
25 - },[PasswordCheck]); 26 + };
26 - const onSubmitHandler = useCallback((event) => { 27 + const onSubmitHandler = (event) => {
27 event.preventDefault(); 28 event.preventDefault();
28 - if(Password !== PasswordCheck){ 29 + console.log("ID", Id);
29 - return setPasswordError(true); 30 + console.log("Password", Password);
31 + console.log("MBTI", Personality);
32 + if (Password !== PasswordCheck) {
33 + return alert('비밀번호가 일치하지 않습니다.')
30 } 34 }
31 - else{ 35 + let body = {
32 - return setPasswordError(false); 36 + id: Id,
37 + password: Password,
38 + personality: Personality
33 } 39 }
34 - console.log("Email",Email); 40 + dispatch(registerUser(body))
35 - console.log("Password", Password); 41 + .then(response => {
36 - },[Password,PasswordCheck]); 42 + if (response.payload.registerSuccess) {
37 - 43 + props.history.push('/login')
44 + } else {
45 + alert('Failed to sign up')
46 + }
47 + })
48 + }
38 return ( 49 return (
39 <div id="Register"> 50 <div id="Register">
40 <div className="register-form"> 51 <div className="register-form">
...@@ -42,34 +53,33 @@ function RegisterPage() { ...@@ -42,34 +53,33 @@ function RegisterPage() {
42 <h1>Tunnel</h1> 53 <h1>Tunnel</h1>
43 <div className="input-area"> 54 <div className="input-area">
44 <Input 55 <Input
45 - icon={<Icon name='at'/>} 56 + icon={<Icon name="id badge"/>}
46 iconPosition='left' 57 iconPosition='left'
47 - placeholder="Email" 58 + placeholder="ID"
48 type="text" 59 type="text"
49 - value={Email} 60 + value={Id}
50 autoComplete="off" 61 autoComplete="off"
51 required onChange={onIdHandler}/> 62 required onChange={onIdHandler}/>
52 </div> 63 </div>
53 <div className="input-area"> 64 <div className="input-area">
54 <Input 65 <Input
66 + icon={<Icon name='heart'/>}
67 + iconPosition='left'
68 + placeholder="Your MBTI"
69 + type="text"
70 + value={Personality}
71 + autoComplete="off"
72 + onChange={onPersonalityHandler}/>
73 + </div>
74 + <div className="input-area">
75 + <Input
55 icon={<Icon name='lock'/>} 76 icon={<Icon name='lock'/>}
56 iconPosition='left' 77 iconPosition='left'
57 placeholder="Password" 78 placeholder="Password"
58 type="password" 79 type="password"
59 value={Password} 80 value={Password}
60 autoComplete="off" 81 autoComplete="off"
61 - onChange={onPasswordHandler} 82 + onChange={onPasswordHandler}/>
62 - onFocus={()=>setPasswordError(false)}/>
63 - {PasswordError &&
64 - <Form error>
65 - <Message
66 - error
67 - header='Action Forbidden'
68 - content='You can only sign up for an account once with a given e-mail address.'
69 - />
70 - <Button>Submit</Button>
71 - </Form>
72 - }
73 </div> 83 </div>
74 <div className="input-area"> 84 <div className="input-area">
75 <Input 85 <Input
...@@ -79,32 +89,17 @@ function RegisterPage() { ...@@ -79,32 +89,17 @@ function RegisterPage() {
79 type="password" 89 type="password"
80 value={PasswordCheck} 90 value={PasswordCheck}
81 autoComplete="off" 91 autoComplete="off"
82 - onChange={onPasswordChkHandler} 92 + onChange={onPasswordChkHandler}/>
83 - onFocus={()=>setPasswordError(false)}/>
84 -
85 - </div>
86 - <div className="input-area">
87 - <Input
88 - icon={<Icon name='heart'/>}
89 - iconPosition='left'
90 - placeholder="Your MBTI"
91 - type="text"
92 - value={Personality}
93 - autoComplete="off"
94 - onChange={onPersonalityHandler}/>
95 </div> 93 </div>
96 <div className="btn-area" > 94 <div className="btn-area" >
97 <Button className='register-btn' 95 <Button className='register-btn'
98 content='Sign up' 96 content='Sign up'
99 icon='signup' 97 icon='signup'
100 - size='small' 98 + size='small'/>
101 - iconPosition='left'/>
102 </div> 99 </div>
103 </form> 100 </form>
104 </div> 101 </div>
105 -
106 </div> 102 </div>
107 ); 103 );
108 } 104 }
109 -
110 export default RegisterPage; 105 export default RegisterPage;
......
1 import React from 'react'; 1 import React from 'react';
2 import ReactDOM from 'react-dom'; 2 import ReactDOM from 'react-dom';
3 +import {Provider} from "react-redux";
3 import './index.css'; 4 import './index.css';
4 import App from './App'; 5 import App from './App';
5 import 'semantic-ui-css/semantic.min.css' 6 import 'semantic-ui-css/semantic.min.css'
7 +import {applyMiddleware, createStore} from "redux";
8 +import promiseMiddleware from 'redux-promise-middleware'
9 +import ReduxThunk from 'redux-thunk'
10 +import Reducer from './_reducers';
6 11
12 +const createStoreWithMiddleWare = applyMiddleware(promiseMiddleware, ReduxThunk)(createStore)
7 ReactDOM.render( 13 ReactDOM.render(
8 - <React.StrictMode> 14 + <Provider store={createStoreWithMiddleWare(Reducer,
9 - <App /> 15 + window.__REDUX_DEVTOOLS_EXTENSION__ &&
10 - </React.StrictMode>, 16 + window.__REDUX_DEVTOOLS_EXTENSION__()
17 + )}>
18 + <App />
19 + </Provider>,
11 document.getElementById('root') 20 document.getElementById('root')
12 ); 21 );
13 22
......
1 -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
...\ No newline at end of file ...\ No newline at end of file
1 +const { createProxyMiddleware } = require('http-proxy-middleware');
2 +module.exports = function(app) {
3 + app.use(
4 + '/api',
5 + createProxyMiddleware({
6 + target: 'http://localhost:3000',
7 + changeOrigin: true,
8 + })
9 + );
10 +};
...\ No newline at end of file ...\ No newline at end of file