Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박민정
/
We-Shop
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박민정
2021-06-05 03:06:34 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ccabfd11c3b3cae4238c74efd1eed5e1bebb21e9
ccabfd11
1 parent
b07f727e
[fix] Fix the error: Target container is not a DOM element
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
boiler-plate/client/src/components/views/LandingPage/LandingPage.js
boiler-plate/client/src/index.js
boiler-plate/server/package-lock.json → boiler-plate/package-lock.json
boiler-plate/server/package.json → boiler-plate/package.json
boiler-plate/client/src/components/views/LandingPage/LandingPage.js
View file @
ccabfd1
...
...
@@ -4,7 +4,7 @@ import axios from 'axios'
function
LandingPage
()
{
// 랜딩페이지에 들어오자마자
useEffect
(()
=>
{
axios
.
get
(
'
http://localhost:5000
/api/hello'
)
// get request를 서버로 보냄 (endpoint는 /api/hello)
axios
.
get
(
'/api/hello'
)
// get request를 서버로 보냄 (endpoint는 /api/hello)
.
then
(
response
=>
console
.
log
(
response
.
data
))
// 서버로부터 응답 받은 내용을 콘솔에 출력
},
[])
...
...
boiler-plate/client/src/index.js
View file @
ccabfd1
...
...
@@ -4,29 +4,28 @@ import './index.css';
import
App
from
'./App'
;
import
reportWebVitals
from
'./reportWebVitals'
;
import
{
Provider
}
from
'react-redux'
// app에 redux를 연결시켜주기 위해 redux에서 제공하는 provider 사용
import
{
createStore
}
from
'redux'
;
// redux에서 createStore 가져옴.
import
{
applyMiddleware
}
from
'redux'
;
// object만 받는 store가 promise나 functions도 받기 위해 middleware을 사용함
//import {
} from 'redux'; // redux에서 createStore 가져옴.
import
{
applyMiddleware
,
createStore
}
from
'redux'
;
// object만 받는 store가 promise나 functions도 받기 위해 middleware을 사용함
import
promiseMiddleware
from
'redux-promise'
;
import
ReduxThunk
from
'redux-thunk'
;
import
Reducer
from
'./_reducers
/index'
import
Reducer
from
'./_reducers
'
;
import
'antd/dist/antd.css'
;
const
createStoreWithMiddleware
=
applyMiddleware
()
const
createStoreWithMiddleware
=
applyMiddleware
(
promiseMiddleware
,
ReduxThunk
)(
createStore
)
ReactDOM
.
render
(
// App에 Redux를 연결
<
Provider
store
=
{
createStoreWithMiddleware
(
Reducer
,
// chrome REDUX_DEVTOOLS extension 사용하기 위해서
window
.
__REDUX_DEVTOOLS_EXTENSIONS__
&&
window
.
__REDUX_DEVTOOLS_EXTENSIONS__
()
window
.
__REDUX_DEVTOOLS_EXTENSION__
&&
window
.
__REDUX_DEVTOOLS_EXTENSION__
()
)}
>
<
App
/>
<
/Provider
>
,
document
.
getElementById
(
'root'
)
);
// If you want to start measuring performance in your app, pass a function
...
...
boiler-plate/
server/
package-lock.json
→
boiler-plate/package-lock.json
View file @
ccabfd1
This diff is collapsed. Click to expand it.
boiler-plate/
server/
package.json
→
boiler-plate/package.json
View file @
ccabfd1
...
...
@@ -4,15 +4,17 @@
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
"start"
:
"node index.js"
,
"backend"
:
"nodemon index.js"
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
"start"
:
"node server/index.js"
,
"backend"
:
"nodemon server/index.js"
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"dev"
:
"concurrently
\"
npm run backend
\"
\"
npm run start --prefix client
\"
"
},
"author"
:
"mindyeoi"
,
"license"
:
"ISC"
,
"dependencies"
:
{
"bcrypt"
:
"^5.0.1"
,
"body-parser"
:
"^1.19.0"
,
"concurrently"
:
"^6.2.0"
,
"cookie-parser"
:
"^1.4.5"
,
"express"
:
"^4.17.1"
,
"jsonwebtoken"
:
"^8.5.1"
,
...
...
Please
register
or
login
to post a comment