serve
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { Elysia } from "elysia";
|
||||
import { Elysia, env } from "elysia";
|
||||
import hash from "object-hash";
|
||||
import { indexedConfig } from "./config";
|
||||
import { deploy } from "./deploy";
|
||||
import { PushEvent } from "./giteaTypes";
|
||||
|
||||
const port = process.env.PORT ?? 6001;
|
||||
const port = env.PORT ?? 6001;
|
||||
|
||||
new Elysia()
|
||||
.onError(({ error }) => console.error(error))
|
||||
@@ -37,6 +37,9 @@ new Elysia()
|
||||
void deploy({ host: service.host, commitHash });
|
||||
return "deploying";
|
||||
})
|
||||
.listen(port);
|
||||
.listen({
|
||||
port,
|
||||
hostname: env.NODE_ENV == "production" ? "0.0.0.0" : "localhost",
|
||||
});
|
||||
|
||||
console.log(`started deployer2 on :${port}`);
|
||||
|
||||
Reference in New Issue
Block a user