Spaces:
Paused
Paused
Download server.js from wokogaming/ML-LT: direct link, hf CLI and curl.
- Browser
- Download file 523 Bytes
-
https://huggingface.co/spaces/wokogaming/ML-LT/resolve/main/server.js
- Command line
-
hf download hf://spaces/wokogaming/ML-LT/server.js
-
curl -L -o server.js https://huggingface.co/spaces/wokogaming/ML-LT/resolve/main/server.js
523 Bytes
| import 'dotenv/config'; | |
| import express from 'express'; | |
| import cors from 'cors'; | |
| import appConfig from './config/app.config.js'; | |
| import routes from './routes/index.js'; | |
| const app = express(); | |
| // Middleware | |
| app.use(cors({ | |
| origin: appConfig.CORS_ORIGIN | |
| })); | |
| app.use(express.json()); | |
| // Mount API routes | |
| app.use('/api', routes); | |
| // Start server | |
| app.listen(appConfig.PORT, () => { | |
| console.log(`Server is running on port ${appConfig.PORT}`); | |
| console.log(`Environment: ${appConfig.NODE_ENV}`); | |
| }); | |