Spaces:
Sleeping
Sleeping
Download app.js from Pepguy/paystack-callback: direct link, hf CLI and curl.
- Browser
- Download file 441 Bytes
-
https://huggingface.co/spaces/Pepguy/paystack-callback/resolve/57c09cf3a8a7ce9988fb7b411208d48da17f83bf/app.js
- Command line
-
hf download hf://spaces/Pepguy/paystack-callback@57c09cf3a8a7ce9988fb7b411208d48da17f83bf/app.js
-
curl -L -o app.js https://huggingface.co/spaces/Pepguy/paystack-callback/resolve/57c09cf3a8a7ce9988fb7b411208d48da17f83bf/app.js
441 Bytes
| const express = require('express'); | |
| const app = express(); | |
| // Middleware to parse JSON bodies | |
| app.use(express.json()); | |
| app.post('/', (req, res) => { | |
| console.log("Received JSON:", req.body); | |
| res.json({ status: "success", message: "Data received" }); | |
| }); | |
| // Use the same port as before or use environment variable PORT | |
| const PORT = process.env.PORT || 7860; | |
| app.listen(PORT, () => { | |
| console.log(`Server running on port ${PORT}`); | |
| }); | |