Commit d07afa10 authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

Merge branch 'kimpen' into jiwon

parents 6eead05b 2143589a
BROWSER=none
PORT=4000
MONGO_URI=mongodb://localhost/
\ No newline at end of file
[{"C:\\Users\\jiwon\\Desktop\\project\\2021winter\\shopping-mall\\client\\src\\App.js":"1","C:\\Users\\jiwon\\Desktop\\project\\2021winter\\shopping-mall\\client\\src\\index.js":"2"},{"size":686,"mtime":1608704732991,"results":"3","hashOfConfig":"4"},{"size":547,"mtime":1608704787952,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"iak5h8",{"filePath":"8","messages":"9","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\jiwon\\Desktop\\project\\2021winter\\shopping-mall\\client\\src\\App.js",[],"C:\\Users\\jiwon\\Desktop\\project\\2021winter\\shopping-mall\\client\\src\\index.js",[]] [{"C:\\Users\\MathUser\\Desktop\\Code\\shopping-mall\\client\\src\\index.js":"1","C:\\Users\\MathUser\\Desktop\\Code\\shopping-mall\\client\\src\\reportWebVitals.js":"2","C:\\Users\\MathUser\\Desktop\\Code\\shopping-mall\\client\\src\\App.js":"3"},{"size":500,"mtime":499162500000,"results":"4","hashOfConfig":"5"},{"size":362,"mtime":499162500000,"results":"6","hashOfConfig":"5"},{"size":528,"mtime":499162500000,"results":"7","hashOfConfig":"5"},{"filePath":"8","messages":"9","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"zu2uto",{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\MathUser\\Desktop\\Code\\shopping-mall\\client\\src\\index.js",[],"C:\\Users\\MathUser\\Desktop\\Code\\shopping-mall\\client\\src\\reportWebVitals.js",[],"C:\\Users\\MathUser\\Desktop\\Code\\shopping-mall\\client\\src\\App.js",[]]
\ No newline at end of file
...@@ -21,3 +21,5 @@ ...@@ -21,3 +21,5 @@
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
package-lock.json
...@@ -6,7 +6,7 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo ...@@ -6,7 +6,7 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo
In the project directory, you can run: In the project directory, you can run:
### `yarn start` ### `npm start`
Runs the app in the development mode.\ Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
...@@ -14,12 +14,12 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. ...@@ -14,12 +14,12 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.\ The page will reload if you make edits.\
You will also see any lint errors in the console. You will also see any lint errors in the console.
### `yarn test` ### `npm test`
Launches the test runner in the interactive watch mode.\ Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `yarn build` ### `npm run build`
Builds the app for production to the `build` folder.\ Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance. It correctly bundles React in production mode and optimizes the build for the best performance.
...@@ -29,7 +29,7 @@ Your app is ready to be deployed! ...@@ -29,7 +29,7 @@ Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `yarn eject` ### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!** **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
...@@ -65,6 +65,6 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/a ...@@ -65,6 +65,6 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/a
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `yarn build` fails to minify ### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
...@@ -3,12 +3,10 @@ ...@@ -3,12 +3,10 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@testing-library/jest-dom": "^5.11.4", "@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.1.0", "@testing-library/react": "^11.2.2",
"@testing-library/user-event": "^12.1.10", "@testing-library/user-event": "^12.6.0",
"bootstrap": "^4.5.3", "bootstrap": "^4.5.3",
"jquery": "^3.5.1",
"popper.js": "^1.16.1",
"react": "^17.0.1", "react": "^17.0.1",
"react-bootstrap": "^1.4.0", "react-bootstrap": "^1.4.0",
"react-dom": "^17.0.1", "react-dom": "^17.0.1",
......
import logo from './logo.svg'; import logo from './logo.svg';
import './App.css'; import './App.css';
import { Button } from 'react-bootstrap';
function App() { function App() {
function funcs(){
alert("hi")
}
return ( return (
<div className="App"> <div className="App">
<header className="App-header"> <header className="App-header">
...@@ -21,11 +17,7 @@ function App() { ...@@ -21,11 +17,7 @@ function App() {
> >
Learn React Learn React
</a> </a>
<Button onClick={funcs}>이름</Button>
</header> </header>
<body>
</body>
</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