Spaces:
Sleeping
Sleeping
Download server/src/index.ts from Leoj030/express_backend: direct link, hf CLI and curl.
- Browser
- Download file 681 Bytes
-
https://huggingface.co/spaces/Leoj030/express_backend/resolve/main/server/src/index.ts
- Command line
-
hf download hf://spaces/Leoj030/express_backend/server/src/index.ts
-
curl -L -o index.ts https://huggingface.co/spaces/Leoj030/express_backend/resolve/main/server/src/index.ts
681 Bytes
| import 'dotenv/config'; | |
| import express from 'express'; | |
| import helmet from 'helmet'; | |
| import rateLimiter from './config/limiter.config.js' | |
| import corsOption from './config/cors.option.js'; | |
| import getterRoute from './routes/getter.route.js'; | |
| import resumeAnalysisRoute from './routes/resume-analysis.route.js'; | |
| const app = express(); | |
| const PORT = process.env.PORT || 7860; | |
| app.set('trust proxy', 1); | |
| app.use(rateLimiter); | |
| app.use(corsOption); | |
| app.use(helmet()); | |
| app.use(express.json()); | |
| app.use(express.urlencoded({ extended: true })); | |
| app.use('/', getterRoute); | |
| app.use('/api', resumeAnalysisRoute); | |
| app.listen(PORT, () => { | |
| console.log(`Server running on port ${PORT}`); | |
| }); |