Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions yarn-project/aztec/src/cli/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fileURLToPath } from '@aztec/aztec.js';
import { ServerList, createNamespacedJsonRpcServer } from '@aztec/foundation/json-rpc/server';
import { ServerList, createNamespacedJsonRpcServer, createStatusRouter } from '@aztec/foundation/json-rpc/server';
import { DebugLogger, LogFn } from '@aztec/foundation/log';

import { Command } from 'commander';
Expand All @@ -10,7 +10,7 @@ import { dirname, resolve } from 'path';
import { cliTexts } from './texts.js';
import { installSignalHandlers } from './util.js';

const { AZTEC_PORT = '8080' } = process.env;
const { AZTEC_PORT = '8080', API_PREFIX = '' } = process.env;

/**
* Returns commander program that defines the 'aztec' command line interface.
Expand Down Expand Up @@ -59,7 +59,11 @@ export function getProgram(userLog: LogFn, debugLogger: DebugLogger): Command {
if (services.length) {
const rpcServer = createNamespacedJsonRpcServer(services, debugLogger);

const app = rpcServer.getApp();
const app = rpcServer.getApp(API_PREFIX);
// add status route
const statusRouter = createStatusRouter(API_PREFIX);
app.use(statusRouter.routes()).use(statusRouter.allowedMethods());

const httpServer = http.createServer(app.callback());
httpServer.listen(options.port);
userLog(`Aztec Server listening on port ${options.port}`);
Expand Down
1 change: 0 additions & 1 deletion yarn-project/p2p-bootstrap/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ resource "aws_ecs_task_definition" "p2p-bootstrap" {
"image": "${var.DOCKERHUB_ACCOUNT}/aztec:${var.DEPLOY_TAG}",
"command": ["start", "--p2p-bootstrap"],
"essential": true,
"command": ["start"],
"memoryReservation": 3776,
"portMappings": [
{
Expand Down