https://github.com/trco/koa-react
Koa & React
https://github.com/trco/koa-react
Last synced: 4 months ago
JSON representation
Koa & React
- Host: GitHub
- URL: https://github.com/trco/koa-react
- Owner: trco
- Created: 2019-06-13T20:28:06.000Z (about 7 years ago)
- Default Branch: react-bootstrap-table2
- Last Pushed: 2023-01-04T00:38:35.000Z (over 3 years ago)
- Last Synced: 2025-07-12T01:08:41.984Z (11 months ago)
- Language: JavaScript
- Size: 1.49 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 35
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
===========
Koa & React
===========
Koa 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 koa-react
$ cd koa-react
2. Install ``koa-generator``::
$ npm install koa-generator -g
3. Create Koa backend app, install dependencies::
$ koa2 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.