Code Monkey home page Code Monkey logo

dotenv's Introduction

Open Source Projects

dotenv cinnamon-spices-applets tidy deft

Github Stats

Github Stats

dotenv's People

Contributors

bettdouglas avatar ibrahim-mubarak avatar izolate avatar mockturtl avatar thosakwe avatar yourilieverdink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dotenv's Issues

Question on security

I have a general question re security using env variables with this package - If semi important credentials are stored in environment variables within a flutter app, how "secure" is it?

  • What would it take for the end user to view them? (they're only used in backend interactions with services)
  • Would it require a decompile/reverse enginerring of the app?
  • Is there a way to harden to resist attack?

commands

  • dotenv parse a file and print to stdout
  • dotenv new create an empty file and .gitignore it

rootBundle.loadString('.env') - Error

I have followed all the instructions add the .env to the pubspec.yaml
Called the DotEnv().load('.env')

But nothing seems to work. So I trying running
rootBundle.loadString('.env');

And it gives me an error saying can not load asset
Flutter version: Flutter 1.9.1+hotfix.4

Usage in flutter project

Hi!

I'm trying to use dotenv package in simple Flutter project but can't get it work.
Added dotenv: ^1.0.0 in pubspec.yaml of the project, then imported it import 'package:dotenv/dotenv.dart' as dotenv; and used by calling dotenv.load() and dotenv.env[myVar].

When debugging load method I found out that it cant find .env file in _verify so it's not adding any of my variables to env.

Are there any other steps I must do to make dotenv work with flutter? On which project structure level should I place my .env file (project root? lib? or maybe near dart file calling load ?).

Flutter Web incompatible

I'm trying to run this on flutter web, and getting this error message in the console:

Flutter Web Bootstrap: Auto
Error: Unsupported operation: _Namespace
    at Object.throw_ [as throw] (http://localhost:56952/dart_sdk.js:5080:11)
    at get _namespace [as _namespace] (http://localhost:56952/dart_sdk.js:56681:17)
    at io._File.new.existsSync (http://localhost:56952/dart_sdk.js:54545:51)
at [_verify] (http://localhost:56952/packages/dotenv/src/dotenv.dart.lib.js:83:14)
at dotenv.DotEnv.new.load (http://localhost:56952/packages/dotenv/src/dotenv.dart.lib.js:75:34)
at http://localhost:56952/packages/comic_book_explorer/main_development.dart.lib.js:39:10
at main (http://localhost:56952/packages/comic_book_explorer/main_development.dart.lib.js:41:7)
at http://localhost:56952/web_entrypoint.dart.lib.js:34:33
    at Object._checkAndCall (http://localhost:56952/dart_sdk.js:5279:16)
    at Object.dcall (http://localhost:56952/dart_sdk.js:5284:17)
    at http://localhost:56952/dart_sdk.js:140291:18
    at Generator.next (<anonymous>)
    at http://localhost:56952/dart_sdk.js:40641:33
    at _RootZone.runUnary (http://localhost:56952/dart_sdk.js:40511:59)
    at _FutureListener.thenAwait.handleValue (http://localhost:56952/dart_sdk.js:35438:29)
    at handleValueCallback (http://localhost:56952/dart_sdk.js:35999:49)
    at _Future._propagateToListeners (http://localhost:56952/dart_sdk.js:36037:17)
    at [_completeWithValue] (http://localhost:56952/dart_sdk.js:35872:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:56952/dart_sdk.js:35906:35)
    at Object._microtaskLoop (http://localhost:56952/dart_sdk.js:40778:13)
    at _startMicrotaskLoop (http://localhost:56952/dart_sdk.js:40784:13)
    at http://localhost:56952/dart_sdk.js:36261:9

Is there any way to fix this?

This package doesn't seem to work for a dart cli

As soon as you build an executable for your dart cli and run that executable from the terminal. It can't find the .env file and throws the following error

[dotenv] Load failed: file not found: File: 'production.env'

filename arg

On read, pass through to load. On write, pass through to touch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.