Adds services directory and env var flag-
This commit is contained in:
0
src/services/auth-service.js
Normal file
0
src/services/auth-service.js
Normal file
1
src/services/config.jsx
Normal file
1
src/services/config.jsx
Normal file
@@ -0,0 +1 @@
|
||||
export const API_ROOT = process.env.API_ROOT;
|
||||
5
src/services/config.test.jsx
Normal file
5
src/services/config.test.jsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { API_ROOT } from "./config"
|
||||
|
||||
test("testing config api root", () => {
|
||||
expect(API_ROOT).toEqual("http://localhost:8080/");
|
||||
});
|
||||
@@ -36,5 +36,10 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [new webpack.HotModuleReplacementPlugin()],
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.EnvironmentPlugin({
|
||||
API_ROOT: "http://localhost:8080/"
|
||||
})
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user