chore: apiurl konpontzen du build-a ongi egiteko

This commit is contained in:
Aitor Urrutia
2022-03-18 23:43:31 +01:00
parent a73cfcfdf4
commit 949a195768

View File

@@ -34,6 +34,8 @@ const query = qs.stringify(
}, },
); );
const apiUrl = process.env.API_URL || 'http://localhost:1337/api';
module.exports = { module.exports = {
plugins: [ plugins: [
'gatsby-plugin-react-helmet', 'gatsby-plugin-react-helmet',
@@ -48,13 +50,13 @@ module.exports = {
resolve: 'gatsby-source-custom-api', resolve: 'gatsby-source-custom-api',
options: { options: {
rootKey: 'kafetegia', rootKey: 'kafetegia',
url: `http://localhost:1337/api/kafetegia?${query}`, url: `${apiUrl}/kafetegia?${query}`,
}, },
}, },
{ {
resolve: 'gatsby-source-strapi', resolve: 'gatsby-source-strapi',
options: { options: {
apiURL: process.env.API_URL || 'http://localhost:1337/api', apiURL: apiUrl,
singleTypes: [ singleTypes: [
'hasiera', 'hasiera',
{ {