*Routes must be defined before listen
This commit is contained in:
parent
d2acea6781
commit
7b9c667749
|
@ -12,12 +12,12 @@ export async function start() {
|
|||
logger: true,
|
||||
});
|
||||
|
||||
await app.listen({ port: 80, host: "0.0.0.0" });
|
||||
|
||||
app.get("/", (req, res) => {
|
||||
res.send(Buffer.from(keyPair.publicKey).toString("hex"));
|
||||
});
|
||||
|
||||
await app.listen({ port: 80, host: "0.0.0.0" });
|
||||
|
||||
const address = app.server.address() as AddressInfo;
|
||||
|
||||
log.info("HTTP/App Server started on ", `${address.address}:${address.port}`);
|
||||
|
|
Loading…
Reference in New Issue