I do alot of react developing, i need a way to setup my code for production or…
Jump to turn (10)
- 1I do alot of react developing, i need a way to setup my code for production or d
- 2how do i setup env for react
- 3i dont need anything special for .env
- 4is the .env is in the src? or main directory for react
- 5// src/utils/logger.js const LOGLEVEL = process.env.REACTAPPLOGLEVEL; const logg
- 6should i import the logger to the app.js or index.js so its always there? propba
- 7logger or Logger
- 8REACTAPPAPIURL=http://localhost:5000/api REACTAPPLOGLEVEL=deve
- 9do i use # for comments in a .env
- 10could I not do something like: const APIURL = process.env.REACTAPPAPIURL; for th
- User
I do alot of react developing, i need a way to setup my code for production or development when im adding console.logs all over the place, and they should only show when a var somewhere is declared as "deve" or "prod"
- Assistant