Skip to content

Commit

Permalink
fix: txe port and aztec start options (#8071)
Browse files Browse the repository at this point in the history
TXE config wasn't taken into account in the last refactor. Also `--port`
and `--prefix` were marked as boolean and not strings, so they probably
have never worked.
  • Loading branch information
Thunkar authored Aug 19, 2024
1 parent 96f35bc commit 23778c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion aztec-up/bin/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
volumes:
- ./log:/usr/src/yarn-project/aztec/log:rw
- ${HOME}:${HOME}
command: start --txe
command: start --txe --port 8081

aztec-nargo:
image: "aztecprotocol/aztec-nargo"
Expand Down
11 changes: 2 additions & 9 deletions yarn-project/aztec/src/cli/aztec_start_options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
],
API: [
{
flag: '--port',
flag: '--port <value>',
description: 'Port to run the Aztec Services on on',
defaultValue: 8080,
envVar: 'AZTEC_PORT',
parseVal: val => parseInt(val, 10),
},
{
flag: '--api-prefix',
flag: '--api-prefix <value>',
description: 'Prefix for API routes on any service that is started',
defaultValue: '',
envVar: 'API_PREFIX',
Expand Down Expand Up @@ -295,12 +295,5 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
defaultValue: undefined,
envVar: undefined,
},
{
flag: '--txe.port <value>',
description: 'Port to run TXE on',
defaultValue: 8081,
envVar: 'TXE_PORT',
parseVal: val => parseInt(val, 10),
},
],
};
5 changes: 2 additions & 3 deletions yarn-project/aztec/src/cli/cmds/start_txe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const startTXE = (options: any, debugLogger: DebugLogger) => {
const app = txeServer.getApp();
const httpServer = http.createServer(app.callback());
httpServer.timeout = 1e3 * 60 * 5; // 5 minutes
const port = parseInt(options.txePort);
httpServer.listen(port);
debugLogger.info(`TXE listening on port ${port}`);
httpServer.listen(options.port);
debugLogger.info(`TXE listening on port ${options.port}`);
};

0 comments on commit 23778c5

Please sign in to comment.