Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 0756894

Browse files
committed
fix: read port env variable after app.prepare
1 parent bce6757 commit 0756894

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { updateMetadataQueue } from './queue/updateMetadata';
1313
const dev = process.env.NODE_ENV !== 'production';
1414
const app = next({ dev });
1515
const handle = app.getRequestHandler();
16-
const port = process.env.KAIZOKU_PORT || 3000;
1716

1817
const serverAdapter = new ExpressAdapter();
1918
serverAdapter.setBasePath('/bull/queues');
@@ -32,6 +31,7 @@ createBullBoard({
3231
(async () => {
3332
try {
3433
await app.prepare();
34+
const port = process.env.KAIZOKU_PORT || 3000;
3535
await scheduleAll();
3636
const server = express();
3737
server.use('/bull/queues', serverAdapter.getRouter()).all('*', (req: Request, res: Response) => {

0 commit comments

Comments
 (0)