Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antazo/js-py
Testing the different JS libraries and frameworks under a Pythonic environment.
https://github.com/antazo/js-py
Last synced: 29 days ago
JSON representation
Testing the different JS libraries and frameworks under a Pythonic environment.
- Host: GitHub
- URL: https://github.com/antazo/js-py
- Owner: antazo
- License: mit
- Created: 2024-11-16T21:35:31.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-17T09:13:35.000Z (about 1 month ago)
- Last Synced: 2024-11-17T09:30:21.964Z (about 1 month ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# js-py
Testing the different JS libraries and frameworks under a Pythonic environment.
For this project we are going to use:
* BACKEND: Django API
* FRONTEND: React.js## Installation
Clone (or fork) this repository:
```bash
git clone https://github.com/antazo/js-py
cd js/py
```### Virtual environment
```bash
python -m venv myenv
source myenv/bin/activate
# On Windows use `.\myenv\Scripts\activate`
pip install -r requirements.txt
```### Run
Run the backend and the frontend in different terminals. For the backend:
```bash
cd backend
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
```For the frontend:
```bash
cd frontend
npm start
```## Documentation
Follow these steps to create the project **js-py** from the scratch.
Create the backend with a new Django project, and API app:
```bash
mkdir backend
cd backend
django-admin startproject core .
django-admin startapp api
```Add in `backend/core/settings.py`:
* `'rest_framework'`, `'corsheaders'` and `'api'` to INSTALLED_APPS
* `'corsheaders.middleware.CorsMiddleware'` to MIDDLEWARE
* `'http://localhost:3000'` to CORS_ALLOWED_ORIGINSFor the frontend, make sure that you have Node.js installed, it is needed for the npm (Node Package Manager). Then, proceed by creating the React app:
```bash
cd ../frontend
npx create-react-app .
npm install axios @mui/material @emotion/react @emotion/styled
```