Download start-dev.js from Zelyanoth/Lin: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/spaces/Zelyanoth/Lin/resolve/main/start-dev.js
- Command line
-
hf download hf://spaces/Zelyanoth/Lin/start-dev.js
-
curl -L -o start-dev.js https://huggingface.co/spaces/Zelyanoth/Lin/resolve/main/start-dev.js
1.19 kB
| const { spawn } = require('child_process'); | |
| const path = require('path'); | |
| console.log('๐ Starting Lin Development Environment...'); | |
| console.log('==========================================\n'); | |
| // Start backend process | |
| console.log('๐ง Starting Backend Server...'); | |
| const backend = spawn('python', ['app.py'], { | |
| cwd: path.join(__dirname, 'backend'), | |
| stdio: 'inherit', | |
| shell: true | |
| }); | |
| // Start frontend process | |
| console.log('๐จ Starting Frontend Development Server...'); | |
| const frontend = spawn('npm', ['run', 'dev'], { | |
| cwd: path.join(__dirname, 'frontend'), | |
| stdio: 'inherit', | |
| shell: true | |
| }); | |
| // Handle process events | |
| backend.on('close', (code) => { | |
| console.log(`Backend process exited with code ${code}`); | |
| frontend.kill(); | |
| }); | |
| frontend.on('close', (code) => { | |
| console.log(`Frontend process exited with code ${code}`); | |
| backend.kill(); | |
| }); | |
| // Handle exit signals | |
| process.on('SIGINT', () => { | |
| console.log('\n๐ Shutting down development servers...'); | |
| backend.kill(); | |
| frontend.kill(); | |
| process.exit(0); | |
| }); | |
| process.on('SIGTERM', () => { | |
| console.log('\n๐ Shutting down development servers...'); | |
| backend.kill(); | |
| frontend.kill(); | |
| process.exit(0); | |
| }); |