You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -39,6 +39,12 @@ Launch a tool to inspect the bundle size
39
39
Start the express server (run a production build first)
40
40
`npm run start`
41
41
42
+
Start storybook component explorer
43
+
`npm run storybook`
44
+
45
+
Build storybook component explorer as standalone app (outputs to "storybook-static" dir)
46
+
`npm run build:storybook`
47
+
42
48
## Configurations
43
49
*[TypeScript Config](./tsconfig.json)
44
50
*[Webpack Config](./webpack.common.js)
@@ -83,3 +89,14 @@ body {
83
89
* To keep our code formatting in check, we use [prettier](https://github.com/prettier/prettier)
84
90
* To keep our code logic and test coverage in check, we use [jest](https://github.com/facebook/jest)
85
91
* To ensure code styles remain consistent, we use [eslint](https://eslint.org/)
92
+
* To provide a place to showcase custom components, we integrate with [storybook](https://storybook.js.org/)
93
+
94
+
## Multi environment configuration
95
+
This project uses [dotenv-webpack](https://www.npmjs.com/package/dotenv-webpack) for exposing environment variables to your code. Either export them at the system level like `export MY_ENV_VAR=http://dev.myendpoint.com && npm run start:dev` or simply drop a `.env` file in the root that contains your key-value pairs like below:
96
+
97
+
```sh
98
+
ENV_1=http://1.myendpoint.com
99
+
ENV_2=http://2.myendpoint.com
100
+
```
101
+
102
+
With that in place, you can use the values in your code like `console.log(process.env.ENV_1);`
0 commit comments