Skip to content

Commit

Permalink
Use port and host default values and update config file
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenkumarct committed Jan 31, 2024
1 parent 46e0a6d commit 6145e91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
5 changes: 0 additions & 5 deletions processor/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ export const config = {
// Payment Providers config
returnUrl: process.env.RETURN_URL,

// Remove it after testing TODO: cleanup
// Required to setup fastify server
serverPort: process.env.SERVER_PORT ? parseInt(process.env.SERVER_PORT) : 8080,
serverHost: process.env.SERVER_HOST || '0.0.0.0',

// TODO review these configurations
// supportedUIElements: convertStringCommaSeparatedValuesToArray(process.env.SUPPORTED_UI_ELEMENTS),
// enableStoreDetails: process.env.ENABLE_STORE_DETAILS === 'true' ? true : false,
Expand Down
7 changes: 4 additions & 3 deletions processor/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import { setupFastify } from "./server";

(async () => {
const server = await setupFastify();


const HOST = '0.0.0.0';
try {
await server.listen({
port: config.serverPort,
host: config.serverHost,
port: 8080,
host: HOST,
});
} catch (err) {
server.log.error(err);
Expand Down

0 comments on commit 6145e91

Please sign in to comment.