Comments (3)
Problem solved. While searching for environment variables had to add the following code
private static Dotenv getDotenvPadrao(){
return Dotenv.configure().directory("/").load();
}
The secret was to add .directory ("/")
from dotenv-kotlin.
Thanks @darlandc1998 for responding with the solution as well!
I was stuck on this for hours, trying to deploy a ktor server and this got everything working.
@cdimascio This should be prominently featured somewhere, maybe under FAQs.
from dotenv-kotlin.
@AdityaAnand1 would you be interested in adding something to the FAQ/README?
Also, could you provide an example of your Ktor app. I'd like to also reproduce this myself.
I'm wondering if this is actually a bug and something that java-dotenv can be made to handle better. any thoughts on your end?
from dotenv-kotlin.
Related Issues (20)
- Dotenv entries() result is not overridden by environment variables HOT 3
- Not working correctly when I execute a jar after gradle build HOT 2
- Option to only load .env file env vars HOT 6
- Multiline value HOT 8
- using env vars from host, it requires .env file HOT 1
- question - incorporating into build.gradle HOT 5
- 5.1.3 library version does not resolve correctly .env file location in jar file. HOT 3
- How is it different from Spring properties? HOT 5
- Make dotenv env variables available in System.getProperty() too HOT 6
- .env file and Travis HOT 5
- Getting an error when running a jar that uses dotenv HOT 1
- kotlin libs are required HOT 3
- Update version in readme
- Crashes on Android version 7 and older HOT 2
- package version 6.3.0 is not published anywhere other than github packages HOT 1
- Android Could not find /asset/env on the classpath HOT 1
- Errors when attempting to start it from a jar.
- Latest build on maven HOT 1
- Feature missing in docs.. DECLARED_IN_ENV filter
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 dotenv-kotlin.