Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hoccyy/blockhouse-oa
https://github.com/hoccyy/blockhouse-oa
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hoccyy/blockhouse-oa
- Owner: Hoccyy
- Created: 2024-09-11T18:50:16.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-11T18:56:06.000Z (2 months ago)
- Last Synced: 2024-09-12T05:06:13.464Z (2 months ago)
- Language: Python
- Size: 14.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Web Development Coding Test: Next.js Application with Django API Integration
Dashboard project made with Django for the backend and Next.Js for frontend.---
# Requirements
- python
- pip
- django
- django-cors-headers
- django djangorestframework
- chartjs
- TypeScript---
### Getting Started
##### 1. Clone the repo and enter it from the CLI
```
git clone https://github.com/Hoccyy/blockhouse-oa.git
cd blockhouse-oa
```
##### 2. Run setup.sh if on Mac/Linux or setup.bat if on Windows
###### Mac/Linux
```
#!/bin/bash
npm install
python3 -m venv .venv
source .venv/bin/activate
cd backendpip install django
pip install django djangorestframework
pip install django-cors-headers
```###### Windows
```
@echo off
npm installpython -m venv .venv
call .venv\Scripts\activate
cd backend
pip install django
pip install djangorestframework
pip install django-cors-headers
```##### 3. Run start.sh if on Mac/Linux or start.bat if on Windows
###### Mac/Linux
```
#!/bin/bash
source .venv/bin/activatepython3 backend/manage.py runserver &
PYTHON_PID=$!npm run dev
wait $PYTHON_PID
```###### Windows
```
@echo off
call .venv\Scripts\activatestart "" /b python backend\manage.py runserver
set "PYTHON_PID=%ERRORLEVEL%"npm run dev
:waitloop
tasklist /FI "PID eq %PYTHON_PID%" 2>NUL | find /I /N "python.exe">NUL
if "%ERRORLEVEL%"=="0" (
timeout /T 5 /NOBREAK >NUL
goto :waitloop
)```
### Usage
After setting up the requirements and starting both servers, open the link in your web browser on [local host](http://localhost:3000) port 3000 (http://localhost:3000).