Skip to content
Snippets Groups Projects
Verified Commit fb26b04c authored by Ewen Le Bihan's avatar Ewen Le Bihan
Browse files

fix(service worker): allow for staging environment public storage URL

parent e9c265e5
Branches
Tags v0.5.2
No related merge requests found
......@@ -10,11 +10,11 @@ dotenv.config({
const filepath = path.join(here, '../service-worker.ts');
const literal = JSON.stringify(
const literal =
process.env.NODE_ENV === 'develoment'
? 'http://localhost:4000/storage'
: 'https://churros.inpt.fr/storage'
);
? JSON.stringify('http://localhost:4000/storage')
: // eslint-disable-next-line no-template-curly-in-string
'`https://${sw.location.hostname}/storage`';
console.log(`Injecting PUBLIC_STORAGE_URL=${literal} into ${filepath}`);
writeFileSync(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment