https://github.com/trco/express-react
Express & React
https://github.com/trco/express-react
Last synced: 5 months ago
JSON representation
Express & React
- Host: GitHub
- URL: https://github.com/trco/express-react
- Owner: trco
- Created: 2019-06-13T17:18:21.000Z (about 7 years ago)
- Default Branch: react-bootstrap-table2
- Last Pushed: 2023-01-04T00:39:41.000Z (over 3 years ago)
- Last Synced: 2025-02-08T11:45:18.982Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 3.46 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 28
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
===============
Express & React
===============
Express backend & React frontend
Run
===
Run docker and visit http://localhost:3000::
$ docker-compose up
How to build it from scratch?
=============================
1. Create project folder::
$ mkdir express-react
$ cd express-react
2. Install ``express-generator``::
$ npm install express-generator -g
3. Create Express backend app, install dependencies::
$ express back
$ cd back
$ npm install
4. Change default port from ``3000`` to ``8000`` in ``bin/www``.
5. Create React frontend app in project folder, install dependencies::
$ npx create-react-app front
$ cd front
$ npm install
6. Add ``"proxy": "http://back:8000"`` to the package.json in frontend app.
7. Create separate ``Dockerfile`` in back and front apps and ``docker-compose.yml`` in project folder.