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