esausilva/example-create-react-app-express
소개
Example on using create-react-app with a Node Express Backend
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalcreate-react-app React Project with Node Express Backend
Example on using create-react-app with a Node Express Backend
Usage
Install nodemon globally
npm i nodemon -g
Install server and client dependencies
yarn
cd client
yarn
To start the server and client at the same time (from the root of the project)
yarn dev
Running the production build on localhost. This will create a production build, then Node will serve the app on http://localhost:5000
NODE_ENV=production yarn dev:server
How this works
The key to use an Express backend with a project created with create-react-app is on using a proxy. We have a proxy entry in client/package.json
"proxy": "http://localhost:5000/"
This tells Webpack development server to proxy our API requests to our API server, given that our Express server is running on localhost:5000
Tutorial
Visit my blog post entry for a detailed step-by-step guide.
Giving Back
If you would like to support my work and the time I put into making tutorials, consider getting me a coffee by clicking on the image below. I would really appreciate it!
-Esau
관련 프로젝트 살펴보기
불러오는 중…
