Spaces:
Running
Running
Andre
deploy: snapshot c96b9ab -- Inventory Journals (Lagerforandringsjournal) na Contabilidade (v1.3.61)
77db408 Download run-dev.js from inwave-gateway/hub: direct link, hf CLI and curl.
- Browser
- Download file 963 Bytes
-
https://huggingface.co/spaces/inwave-gateway/hub/resolve/main/run-dev.js
- Command line
-
hf download hf://spaces/inwave-gateway/hub/run-dev.js
-
curl -L -o run-dev.js https://huggingface.co/spaces/inwave-gateway/hub/resolve/main/run-dev.js
963 Bytes
| const { spawn } = require('child_process'); | |
| const path = require('path'); | |
| const isWindows = process.platform === 'win32'; | |
| const backendDir = path.join(__dirname, 'backend'); | |
| const frontendDir = path.join(__dirname, 'frontend'); | |
| const backend = spawn( | |
| isWindows ? '.venv\\Scripts\\python.exe' : 'python', | |
| isWindows ? ['-m', 'uvicorn', 'main:app', '--reload'] : ['-m', 'uvicorn', 'main:app', '--reload'], | |
| { | |
| cwd: backendDir, | |
| shell: true, | |
| stdio: 'inherit' | |
| } | |
| ); | |
| const frontend = spawn(isWindows ? 'npm.cmd' : 'npm', ['run', 'dev'], { | |
| cwd: frontendDir, | |
| shell: true, | |
| stdio: 'inherit' | |
| }); | |
| console.log('\n--- Backend (FastAPI) running at http://127.0.0.1:8000 ---\n'); | |
| console.log('--- Frontend (Next.js) running at http://localhost:3000 ---\n'); | |
| const cleanup = () => { | |
| console.log('\n\nShutting down servers...'); | |
| backend.kill(); | |
| frontend.kill(); | |
| process.exit(0); | |
| }; | |
| process.on('SIGINT', cleanup); | |
| process.on('SIGTERM', cleanup); |