Spaces:
Build error
Build error
Download back/main.js from chartManD/testing-area: direct link, hf CLI and curl.
- Browser
- Download file 599 Bytes
-
https://huggingface.co/spaces/chartManD/testing-area/resolve/main/back/main.js
- Command line
-
hf download hf://spaces/chartManD/testing-area/back/main.js
-
curl -L -o main.js https://huggingface.co/spaces/chartManD/testing-area/resolve/main/back/main.js
599 Bytes
| let express = require("express"); | |
| let bodyParser = require("body-parser"); | |
| const res = require("express/lib/response"); | |
| const req = require("express/lib/request"); | |
| let app = express(); | |
| const PORT = process.env.PORT || 7860; | |
| // Uso middleware | |
| // app.use("/public", express.static(`${__dirname}/../frond/dist/public`)); | |
| app.use("/public", express.static(`${__dirname}/public`)); | |
| app.use(bodyParser.urlencoded({ extended: false })); | |
| // Endpoints | |
| app.get("/", (req, res) => { | |
| res.sendFile(`${__dirname}/index.html`); | |
| }); | |
| app.listen(PORT, () => { | |
| console.log("La aplicacion esta corriendo"); | |
| }); | |