Skip to content

Commit

Permalink
Dumbass
Browse files Browse the repository at this point in the history
  • Loading branch information
virtulis committed Nov 3, 2024
1 parent 1c748c9 commit a43c737
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ async function main() {
await mkdir('dist', { recursive: true });
await mkdir('conf', { recursive: true });

const BASE_DIR = await realpath(process.cwd());
const DIST_DIR = await realpath('dist');
const CONF_DIR = await realpath('conf');
const [BASE_HOST, IP4_HOST, IP6_HOST, PONG_PORT] = [config.baseHost, config.ipv4Host, config.ipv4Host, config.pongServerPort];
const CONFIG_JSON = JSON.stringify(config);

const vars = { BASE_HOST, IP4_HOST, IP6_HOST, DIST_DIR, CONF_DIR, PONG_PORT, CONFIG_JSON };
const vars = { BASE_HOST, IP4_HOST, IP6_HOST, BASE_DIR, DIST_DIR, CONF_DIR, PONG_PORT, CONFIG_JSON };
console.log(vars);

const files = await readdir('template');
Expand Down
2 changes: 1 addition & 1 deletion template/this-computer-pong.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Description=This.Computer Pong Server

[Service]
WorkingDirectory=DIST_DIR
WorkingDirectory=BASE_DIR
Environment="WS_PORT=PONG_PORT"
ExecStart=/usr/bin/node pong/server.js
Restart=on-failure
Expand Down

0 comments on commit a43c737

Please sign in to comment.