diff --git a/src/services/auth-service.js b/src/services/auth-service.js new file mode 100644 index 0000000..e69de29 diff --git a/src/services/config.jsx b/src/services/config.jsx new file mode 100644 index 0000000..96f6d90 --- /dev/null +++ b/src/services/config.jsx @@ -0,0 +1 @@ +export const API_ROOT = process.env.API_ROOT; diff --git a/src/services/config.test.jsx b/src/services/config.test.jsx new file mode 100644 index 0000000..ca52518 --- /dev/null +++ b/src/services/config.test.jsx @@ -0,0 +1,5 @@ +import { API_ROOT } from "./config" + +test("testing config api root", () => { + expect(API_ROOT).toEqual("http://localhost:8080/"); +}); diff --git a/webpack.config.js b/webpack.config.js index 75d8c38..7e94750 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -36,5 +36,10 @@ module.exports = { }, }, }, - plugins: [new webpack.HotModuleReplacementPlugin()], + plugins: [ + new webpack.HotModuleReplacementPlugin(), + new webpack.EnvironmentPlugin({ + API_ROOT: "http://localhost:8080/" + }) + ], };