Adds services directory and env var flag-

This commit is contained in:
2021-01-18 17:57:44 -06:00
parent 3998d43041
commit ea710c3845
4 changed files with 12 additions and 1 deletions

View File

1
src/services/config.jsx Normal file
View File

@@ -0,0 +1 @@
export const API_ROOT = process.env.API_ROOT;

View File

@@ -0,0 +1,5 @@
import { API_ROOT } from "./config"
test("testing config api root", () => {
expect(API_ROOT).toEqual("http://localhost:8080/");
});

View File

@@ -36,5 +36,10 @@ module.exports = {
},
},
},
plugins: [new webpack.HotModuleReplacementPlugin()],
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.EnvironmentPlugin({
API_ROOT: "http://localhost:8080/"
})
],
};