{"id":16668614,"url":"https://github.com/codhek/dashenv","last_synced_at":"2025-12-30T04:21:03.026Z","repository":{"id":129540418,"uuid":"156836941","full_name":"CodHeK/dashenv","owner":"CodHeK","description":"npm package to load environment variables from a -env file","archived":false,"fork":false,"pushed_at":"2018-11-09T11:47:16.000Z","size":2,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T17:12:48.419Z","etag":null,"topics":["environment-variables","npm-package"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodHeK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-09T09:05:39.000Z","updated_at":"2018-11-12T03:48:59.000Z","dependencies_parsed_at":"2023-05-10T15:15:39.515Z","dependency_job_id":null,"html_url":"https://github.com/CodHeK/dashenv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodHeK%2Fdashenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodHeK%2Fdashenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodHeK%2Fdashenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodHeK%2Fdashenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodHeK","download_url":"https://codeload.github.com/CodHeK/dashenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243314063,"owners_count":20271301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["environment-variables","npm-package"],"created_at":"2024-10-12T11:26:08.593Z","updated_at":"2025-12-30T04:21:03.001Z","avatar_url":"https://github.com/CodHeK.png","language":"JavaScript","readme":"# dashenv\n\n![dashenv](https://img.shields.io/badge/npm-v1.1.0-blue.svg)\n\n\n```\nnpm i dashenv\n```\n\n### How to use ?\n#\nSave your environment variables in a file `-env`, pass your `path` to the `-env` file and also a `callback` function to get your environment variables.\n#### Your `-env`  file :\n#\n```\nENDPOINT=http://localhost:3000/graphql\nSERVER=development\n```\n#### Use it as follows in the file you want to use your environment variables :\n#\n```\nconst extract = require('dashenv');\n\nconst path = './env_vars/-env';\nextract(path, function(env) {\n  console.log(env[\"ENDPOINT\"]);\n  console.log(env[\"SERVER\"]);\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodhek%2Fdashenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodhek%2Fdashenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodhek%2Fdashenv/lists"}