Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit 8ed7325

Browse files
author
Théodore Biadala
committed
chore(build): keep env variable and update build command
1 parent c5129ed commit 8ed7325

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
99
"start": "npm run dev",
10-
"build": "node build/build.js"
10+
"build": "API_URL=https://api.github.com node build/build.js"
1111
},
1212
"dependencies": {
1313
"axios": "^0.18.0",

src/utils/request.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import localforage from "localforage";
33
import { setupCache } from "axios-cache-adapter";
44

55
const store = localforage.createInstance({ name: "ovh-ux" });
6-
const giturl = "http://api.github.com";
76

87
export const cache = setupCache({
98
maxAge: 60 * 60 * 1000,
@@ -16,7 +15,7 @@ export const cache = setupCache({
1615

1716
export const api = axios.create({
1817
adapter: cache.adapter,
19-
baseURL: giturl,
18+
baseURL: `${process.env.API_URL}`,
2019
method: "get",
2120
headers: {
2221
Accept: "application/vnd.github.mercy-preview+json"

0 commit comments

Comments
 (0)