Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jordaneremieff/starlette-react
An example React app using a Starlette backend
https://github.com/jordaneremieff/starlette-react
asgi javascript python react starlette
Last synced: 3 days ago
JSON representation
An example React app using a Starlette backend
- Host: GitHub
- URL: https://github.com/jordaneremieff/starlette-react
- Owner: jordaneremieff
- License: mit
- Created: 2018-10-07T05:54:22.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2020-07-31T03:17:25.000Z (over 4 years ago)
- Last Synced: 2024-10-26T06:31:01.084Z (about 2 months ago)
- Topics: asgi, javascript, python, react, starlette
- Language: JavaScript
- Size: 753 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# starlette-react
A basic example of using a [React](https://reactjs.org/) application with [Starlette](https://www.starlette.io/).
## Setup
### Backend
**Requirements**: Python 3.6+
- Install `starlette` and `uvicorn` from the requirements file in the backend directory:
`pip install -r requirements.txt --upgrade`- Run the application using `uvicorn`:
`python app.py`
[Uvicorn](https://www.uvicorn.org/) is the [ASGI](https://asgi.readthedocs.io/en/latest/) server used to run the application in this example, however other ASGI servers, such as [Hypercorn](https://pgjones.gitlab.io/hypercorn/) and [Daphne](https://github.com/django/daphne) could be used as well.
### Frontend
The React app was initially created using the `create-react-app` command.
- Install the dependencies:
`yarn install`
- Run the server:
`yarn start`