init hello-test app
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
name = "hello-test"
|
||||||
|
version = "1.0.0"
|
||||||
|
framework = "express"
|
||||||
|
type = "backend"
|
||||||
|
|
||||||
|
[start]
|
||||||
|
command = "node server.js"
|
||||||
|
processes = 1
|
||||||
|
|
||||||
|
[web]
|
||||||
|
path = "/"
|
||||||
|
health = "/health"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"name":"hello-test","version":"1.0.0","private":true,"dependencies":{"express":"^4.18.0"}}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
const express = require("express");
|
||||||
|
const app = express();
|
||||||
|
const port = process.env.PORT || 3000;
|
||||||
|
app.get("/", (req, res) => res.send("Hello from test app!"));
|
||||||
|
app.get("/health", (req, res) => res.json({ status: "ok" }));
|
||||||
|
app.listen(port, () => console.log("Test app on port", port));
|
||||||
Reference in New Issue
Block a user