Commit 49cc2fe8 authored by 이재연's avatar 이재연
Browse files

병합

parents 3721af70 2143589a
BROWSER=none
PORT=4000
MONGO_URI=mongodb://localhost/
\ No newline at end of file
[{"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\index.js":"1","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\App.js":"2","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\reportWebVitals.js":"3"},{"size":547,"mtime":1608704689894,"results":"4","hashOfConfig":"5"},{"size":652,"mtime":1608705187305,"results":"6","hashOfConfig":"5"},{"size":362,"mtime":499162500000,"results":"7","hashOfConfig":"5"},{"filePath":"8","messages":"9","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1f8h90z",{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"14"},"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\index.js",[],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\App.js",[],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\reportWebVitals.js",[],["15","16"],{"ruleId":"17","replacedBy":"18"},{"ruleId":"19","replacedBy":"20"},"no-native-reassign",["21"],"no-negated-in-lhs",["22"],"no-global-assign","no-unsafe-negation"] [{"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\index.js":"1","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\App.js":"2","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\reportWebVitals.js":"3"},{"size":547,"mtime":1608704689894,"results":"4","hashOfConfig":"5"},{"size":652,"mtime":1608705187305,"results":"6","hashOfConfig":"5"},{"size":362,"mtime":499162500000,"results":"7","hashOfConfig":"5"},{"filePath":"8","messages":"9","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1f8h90z",{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"14"},"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\index.js",[],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\App.js",[],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\reportWebVitals.js",[],["15","16"],{"ruleId":"17","replacedBy":"18"},{"ruleId":"19","replacedBy":"20"},"no-native-reassign",["21"],"no-negated-in-lhs",["22"],"no-global-assign","no-unsafe-negation"]
\ No newline at end of file
...@@ -12,7 +12,7 @@ function App() { ...@@ -12,7 +12,7 @@ function App() {
<header className="App-header"> <header className="App-header">
<img src={logo} className="App-logo" alt="logo" /> <img src={logo} className="App-logo" alt="logo" />
<p> <p>
안녕하세요 Edit <code>src/App.js</code> and save to reload.
</p> </p>
<a <a
className="App-link" className="App-link"
...@@ -22,7 +22,6 @@ function App() { ...@@ -22,7 +22,6 @@ function App() {
> >
Learn React Learn React
</a> </a>
<Button onClick={btnfunc} >button</Button>
</header> </header>
</div> </div>
); );
......
import React, { useState, useEffect, useRef } from 'react';
import { Link } from 'react-router-dom';
function MainNav() {
return (
<div>
</div>
)
}
export default MainNav
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import { Link } from 'react-router-dom';
function SubNav() {
return (
<div>
</div>
)
}
export default SubNav
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import { Redirect } from 'react-router';
import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav';
function Admin() {
return (
<div>
<Nav1 />
<Nav2 />
</div>
)
}
export default Admin
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav';
function Home() {
return (
<div>
<Nav1 />
<Nav2 />
</div>
)
}
export default Home
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav';
function Login() {
return (
<div>
<Nav1 />
<Nav2 />
</div>
)
}
export default Login
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav';
function Payment() {
return (
<div>
<Nav1 />
<Nav2 />
</div>
)
}
export default Payment
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav';
function Products() {
return (
<div>
<Nav1 />
<Nav2 />
</div>
)
}
export default Products
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav';
import Products from './Products';
function ProductsList() {
return (
<div>
<Nav1 />
<Nav2 />
</div>
)
}
export default ProductsList
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav';
function ProductsRegist() {
return (
<div>
<Nav1 />
<Nav2 />
</div>
)
}
export default ProductsRegist
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import { Redirect } from 'react-router';
import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav';
function ShoppingCart() {
return (
<div>
<Nav1 />
<Nav2 />
</div>
)
}
export default ShoppingCart
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import { Redirect } from 'react-router';
import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav';
function Signup() {
return (
<div>
<Nav1 />
<Nav2 />
</div>
)
}
export default Signup
\ No newline at end of file
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import './index.css'; import { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom';
import App from './App'; import Home from './Pages/Home';
import Login from './Pages/Login';
import Signup from './Pages/Signup';
import Admin from './Pages/Admin';
import ShoppingCart from './Pages/ShoppingCart';
import Payment from './Pages/Payment';
import reportWebVitals from './reportWebVitals'; import reportWebVitals from './reportWebVitals';
import 'bootstrap/dist/css/bootstrap.min.css'; import 'bootstrap/dist/css/bootstrap.min.css';
ReactDOM.render( ReactDOM.render(
<React.StrictMode> <React.StrictMode>
<App /> <Router>
<Switch>
<Route exact path="/" component={Home} />
<Route path="/login" component={Login} />
<Route path="/signup" component={Signup} />
<Redirect path="/" to="/" />
</Switch>
</Router>
</React.StrictMode>, </React.StrictMode>,
document.getElementById('root') document.getElementById('root')
); );
......
// const createError = require('http-errors');
const express = require('express');
const path = require('path');
const cookieParser = require('cookie-parser');
const logger = require('morgan');
const port = 3030;
const indexRouter = require('./routes/index');
const app = express();
connect();
// view engine setup
// app.set('views', path.join(__dirname, 'views'));
// app.set('view engine', 'pug');
// app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
// app.use(cookieParser(process.env.JWT_SECRET));
app.use(express.static(path.join(__dirname, 'public')));
app.use('/', indexRouter);
app.listen(port, () => console.log(port));
// catch 404 and forward to error handler
app.use(function(req, res, next) {
next(createError(404));
});
// error handler
app.use(function(err, req, res, next) {
// set locals, only providing error in development
res.locals.message = err.message;
res.locals.error = req.app.get('env') === 'development' ? err : {};
// render the error page
res.status(err.status || 500);
// res.render('error');
});
module.exports = app;
\ 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