Comments (4)
@KhudaDad414. So here we are looking for a functionality , where we have multiple envs like .env.production .env.development and then according to NODE_ENV specific env is used.SO we can acheive this thing by require('dotenv').config({ path: `.env.${process.env.NODE_ENV}` });
.
from glee.
@AkhilJ321, I suggest you follow the following steps:
-
Install
@next/env
. -
Use the
loadEnvConfig
function to load the configuration in theindex.ts
file of Glee. It should be something likeloadEnvConfig(GLEE_PROJECT_DIR, isDev)
. You can check if it is a development environment by verifying whetherprocess.env.NODE_ENV
is set todevelopment
orproduction
. -
Document how Glee can now support multiple .env files. You can draw inspiration from Next.js environment variables documentation since Glee will use Next.js's package, and the functionality will be the same.
-
For testing, run one of the examples and then create files like
.env
,.env.local
,.env.production
,.env.development
, adding environment variables to them. Afterwards, log these variables in the example's function to see if it picks up the variables as expected.
from glee.
@KhudaDad414 ,I made the changes in code, but i am confused about how to test this thing out in my local setup.
from glee.
🎉 This issue has been resolved in version 0.35.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from glee.
Related Issues (20)
- Move `x-remoteServers` Configuration to `glee.config.(js|ts)` HOT 5
- handling request error for websocket connection HOT 1
- Improve Stability in Glee by Handling Message and Connection Failures HOT 3
- Internal nodejs error while running the example app HOT 8
- Apply `default` property to event fields HOT 4
- Update Kafka Adapter to support spec v3 HOT 2
- Improved Error Messaging for Missing Auth Function HOT 4
- Spread syntax requires HOT 2
- but this path is not defined in your AsyncAPI file - Caused by trailing slash HOT 6
- Unable to send message with glee when payload is an object with an allOf of two or more objects HOT 5
- MQTT channel seems to be using wrong topic when sending message HOT 1
- Parameters in channel address not used HOT 3
- Divide "Maintainer" role into two categories: Triager and Committer HOT 3
- [BUG] It does not support non-ssl Kafka Brokers HOT 2
- [BUG] Glee subscribes to topics using channel names instead of "channel.address" (v3) HOT 8
- [FEATURE] Run Glee in a container HOT 2
- [FEATURE] invoke send action for operation in v3 HOT 2
- [FEATURE] Investigate bun if it's right for glee HOT 10
- extract glee-core from glee HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glee.