hello-node: minimal HTTP server for the host-app POC
This commit is contained in:
5
package.json
Normal file
5
package.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "hello-node",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"scripts": { "start": "node server.js" }
|
||||||
|
}
|
||||||
6
server.js
Normal file
6
server.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
const http = require("http");
|
||||||
|
const port = process.env.PORT || 3000;
|
||||||
|
http.createServer((req, res) => {
|
||||||
|
res.writeHead(200, { "Content-Type": "text/plain" });
|
||||||
|
res.end(`hello from the yourai app platform\napp: hello-node\ngreeting: ${process.env.GREETING || "(unset)"}\n`);
|
||||||
|
}).listen(port, () => console.log(`listening on ${port}`));
|
||||||
Reference in New Issue
Block a user