Skip to content

Commit

Permalink
Add PMTILES override
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 17, 2024
1 parent 276b15f commit c133dad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class Config {
SigningSecret = 'coe-wildland-fire';
API_URL = 'http://localhost:5001';
Bucket = process.env.ASSET_BUCKET;
PMTILES_URL = 'http://localhost:5001';
PMTILES_URL = process.env.PMTILES_URL || 'http://localhost:5001';
} else {
if (!process.env.StackName) throw new Error('StackName env must be set');
if (!process.env.API_URL) throw new Error('API_URL env must be set');
Expand All @@ -133,7 +133,7 @@ export default class Config {
const apiUrl = new URL(`http://${process.env.API_URL}`);
if (apiUrl.hostname === 'localhost') {
API_URL = `http://${process.env.API_URL}`;
PMTILES_URL = 'http://localhost:5001'
PMTILES_URL = process.env.PMTILES_URL || 'http://localhost:5001'
} else {
PMTILES_URL = `https://tiles.${process.env.API_URL}`;
API_URL = String(`https://${process.env.API_URL}`);
Expand Down

0 comments on commit c133dad

Please sign in to comment.