Spaces:
Paused
Paused
Download index.js from mikmc/random-test: direct link, hf CLI and curl.
- Browser
- Download file 537 Bytes
-
https://huggingface.co/spaces/mikmc/random-test/resolve/main/index.js
- Command line
-
hf download hf://spaces/mikmc/random-test/index.js
-
curl -L -o index.js https://huggingface.co/spaces/mikmc/random-test/resolve/main/index.js
537 Bytes
| require('dotenv').config(); | |
| const express = require('express'); | |
| const cors = require('cors'); | |
| const path = require('path'); | |
| const log = require('./src/helpers/logger'); | |
| const routes = require('./src/routes/index'); | |
| const PORT = process.env.PORT || 7000; | |
| const app = express(); | |
| app.use(cors()); | |
| app.use(express.static(path.join(__dirname, 'public'))); | |
| app.use(express.json()); | |
| app.use('/', routes); | |
| app.listen(PORT, () => { | |
| log.info(`Server running on port ${PORT} - Environment: ${process.env.NODE_ENV || 'development'}`); | |
| }); | |