Skip to content
Permalink
Browse files
Use netlify env variables for production
  • Loading branch information
digitalmaster committed Apr 2, 2020
1 parent 18459f3 commit fda9b5e90e44a1ea0a11c1a0ce793c3c6c3b0d9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
@@ -2,9 +2,5 @@
"development": {
"apiUrl": "http://localhost:2368",
"contentApiKey": "729086654d48e6bf0af2b7cb4b"
},
"production": {
"apiUrl": "https://josebrowne.tunnel.datahub.at",
"contentApiKey": "729086654d48e6bf0af2b7cb4b"
}
}
@@ -8,13 +8,13 @@ let ghostConfig;
try {
ghostConfig = require(`./.ghost`);
} catch (e) {
ghostConfig = {
production: {
apiUrl: process.env.GHOST_API_URL,
contentApiKey: process.env.GHOST_CONTENT_API_KEY,
},
};
console.log(`No .ghost config found`);
} finally {
ghostConfig.production = {
apiUrl: process.env.GHOST_API_URL,
contentApiKey: process.env.GHOST_CONTENT_API_KEY,
};

const { apiUrl, contentApiKey } =
process.env.NODE_ENV === `development`
? ghostConfig.development

0 comments on commit fda9b5e

Please sign in to comment.