Spaces:
Configuration error
Configuration error
Download dev-server.js from carefullycraftedtree/cc_site_maker: direct link, hf CLI and curl.
- Browser
- Download file 761 Bytes
-
https://huggingface.co/spaces/carefullycraftedtree/cc_site_maker/resolve/main/dev-server.js
- Command line
-
hf download hf://spaces/carefullycraftedtree/cc_site_maker/dev-server.js
-
curl -L -o dev-server.js https://huggingface.co/spaces/carefullycraftedtree/cc_site_maker/resolve/main/dev-server.js
761 Bytes
| // Development server wrapper | |
| import { spawn } from 'child_process'; | |
| import fs from 'fs'; | |
| // Ensure environment variables are set correctly | |
| process.env.NODE_ENV = 'development'; | |
| process.env.APP_PORT = '7860'; | |
| console.log('Starting development server on port 7860...'); | |
| // Start the server | |
| const server = spawn('node', ['server.js'], { | |
| env: process.env, | |
| stdio: 'inherit' | |
| }); | |
| // Handle server process events | |
| server.on('error', (err) => { | |
| console.error('Failed to start server process:', err); | |
| }); | |
| process.on('SIGINT', () => { | |
| console.log('Stopping development server...'); | |
| server.kill('SIGINT'); | |
| process.exit(0); | |
| }); | |
| process.on('SIGTERM', () => { | |
| console.log('Stopping development server...'); | |
| server.kill('SIGTERM'); | |
| process.exit(0); | |
| }); | |