How to work with env variables ? #1744
Answered
by
jamonholmgren
dennisbouwpas
asked this question in
Q&A
-
What's going on? In the project, I see folder ./config with env file inside module.exports = __DEV__ ? require("./env.dev") : require("./env.prod"); Inside api-config.ts I see // Use this import if you want to use "env.js" file
// const { API_URL } = require("../../config/env")
// Or just specify it directly like this:
const API_URL = "http://example.com" I created 2 files, But when I try to import this file how was mentioned above So my question is, how to work with env variables and how to change this DEV variable?
|
Beta Was this translation helpful? Give feedback.
Answered by
jamonholmgren
Jul 23, 2021
Replies: 1 comment 4 replies
-
Rename them to |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
jamonholmgren
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rename them to
env.dev.js
andenv.prod.js
and they should work well!