-
-
Notifications
You must be signed in to change notification settings - Fork 829
Use dotenv and provide example #743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I added a section about this in the manual. So I'm closing this issue. os-js/manual.os-js.org@3ed7080 Since I'm doing some passes on the manuals at this moment this will get better documented. |
hi @andersevenrud. require('dotenv').config();
module.exports = {
root,
port: process.env.PORT,
public: path.resolve(root, 'dist'),
} I have also used the following in the client config file. import 'dotenv/config';
export default {
session:{
timeout: process.env.CLIENT_SESSION_TIMEOUT
},
} But in the client, I get the value of timeout parameter as undefined. |
Didn't you solve this here os-js/osjs-client#208 ? |
This comment was marked as outdated.
This comment was marked as outdated.
Hm. Come to think of it you probably might have to add a Webpack plugin. Try https://github.com/mrsteele/dotenv-webpack, but with an older version (6.x.x) for the webpack used here. The standalone |
This issue os-js/osjs-client#208 was for use in Docker. |
Split out from #742
It would be nice to use
dotenv
by default to allow overriding the very basicfoo/config.js
defaults, as well as a.env.example
for reference.This could probably also contain the docker-composer variables as well.
The text was updated successfully, but these errors were encountered: