Spaces:
Sleeping
Sleeping
Update index.js
Browse files
index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const http = require("http");
|
| 2 |
+
|
| 3 |
+
const PORT = process.env.PORT || 3000;
|
| 4 |
+
|
| 5 |
+
const server = http.createServer((req, res) => {
|
| 6 |
+
res.writeHead(200, { "Content-Type": "text/plain" });
|
| 7 |
+
res.end("Hello from Hugging Face Space with Node.js + Docker!\n");
|
| 8 |
+
});
|
| 9 |
+
|
| 10 |
+
server.listen(PORT, () => {
|
| 11 |
+
console.log(`Server running at http://0.0.0.0:${PORT}/`);
|
| 12 |
+
});
|