Skip to content

Commit

Permalink
feat(URL Prefix): Enable URL Prefixes with URL_PREFIX env flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cblanc committed Jun 7, 2023
1 parent ab2a0d0 commit c0ee972
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ export const routes = (app: Express): void => {

router.get("/scotland/postcodes/:postcode", scottishPostcodes.show);

const config = getConfig();
app.use(config.urlPrefix, router);
const { urlPrefix } = getConfig();
if (urlPrefix) app.use(urlPrefix, router);
};

0 comments on commit c0ee972

Please sign in to comment.