Compare commits
3 commits
12cceb99cd
...
56f1591b6e
Author | SHA1 | Date | |
---|---|---|---|
56f1591b6e | |||
c05b6f1a8a | |||
527880457c |
2 changed files with 22 additions and 1 deletions
15
.forgejo/workflows/boot-test.yml
Normal file
15
.forgejo/workflows/boot-test.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: "Make sure the server is actually able to start"
|
||||
author: "9pfs@amcforum.wiki (h @ nest)"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
prettier:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- id: dependencies
|
||||
run: NODE_ENV=development npm ci
|
||||
- id: boot-test
|
||||
run: TEST_MODE=boot LISTEN_PATH=/tmp/webserver.sock node index.js
|
8
index.js
8
index.js
|
@ -89,4 +89,10 @@ if (listen_path[0] == "/") {
|
|||
await unlink(listen_path);
|
||||
} catch (e) {}
|
||||
}
|
||||
app.listen(listen_path);
|
||||
const listener = app.listen(listen_path);
|
||||
if (process.env?.TEST_MODE == "boot") {
|
||||
console.log("Server started successfully.");
|
||||
// We've successfully started. Time to shut down.
|
||||
listener.close();
|
||||
process.exit(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue