Download TravelYaari-react/server.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 437 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/TravelYaari-react/server.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/TravelYaari-react/server.js
-
curl -L -o server.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/TravelYaari-react/server.js
437 Bytes
| const express = require('express'); | |
| const compression = require('compression'); | |
| const path = require('path'); | |
| const app = express(); | |
| app.use(compression()); | |
| app.use(express.static(path.join(__dirname, 'build'))); | |
| app.get('*', function(req, res) { | |
| res.sendFile(path.join(__dirname, 'build', 'index.html')); | |
| }); | |
| const PORT = process.env.PORT || 3000; | |
| app.listen(PORT, () => { | |
| console.log(`App is running on port ${PORT}`); | |
| }); | |