{"id":15417311,"url":"https://github.com/ampatspell/ember-cli-fastboot-dotenv","last_synced_at":"2026-05-02T14:35:35.387Z","repository":{"id":57223256,"uuid":"105884992","full_name":"ampatspell/ember-cli-fastboot-dotenv","owner":"ampatspell","description":"Ember.js dotenv for FastBoot","archived":false,"fork":false,"pushed_at":"2017-10-05T23:57:55.000Z","size":31,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T15:53:53.466Z","etag":null,"topics":["dotenv","ember-addon","ember-cli-addon","emberjs","fastboot","javascript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ampatspell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-05T12:03:45.000Z","updated_at":"2017-10-20T07:39:45.000Z","dependencies_parsed_at":"2022-08-25T14:41:36.711Z","dependency_job_id":null,"html_url":"https://github.com/ampatspell/ember-cli-fastboot-dotenv","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampatspell%2Fember-cli-fastboot-dotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampatspell%2Fember-cli-fastboot-dotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampatspell%2Fember-cli-fastboot-dotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ampatspell%2Fember-cli-fastboot-dotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ampatspell","download_url":"https://codeload.github.com/ampatspell/ember-cli-fastboot-dotenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245966926,"owners_count":20701759,"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":["dotenv","ember-addon","ember-cli-addon","emberjs","fastboot","javascript"],"created_at":"2024-10-01T17:15:14.558Z","updated_at":"2026-05-02T14:35:35.353Z","avatar_url":"https://github.com/ampatspell.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-cli-fastboot-dotenv\n\n`ember-cli-dotenv`-like addon for Ember.js for FastBoot which allows to use environment variables passed to FastBoot server in runtime.\n\nUse `.env` file for development and production defaults.\n\nSee [Ohne Zeit](https://github.com/ampatspell/ohne-zeit) as an example from which the following info is extracted from.\n\n```\n// .env\nCOUCH_URL=http://127.0.0.1:5984\nDATABASE_NAME=ohne-zeit\nCHANGES_FEED=event-source\n```\n\nSet allowed keys in `ember-cli-build`:\n\n``` javascript\nconst EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n  let app = new EmberApp(defaults, {\n    'ember-cli-fastboot-dotenv': {\n      keys: [ 'COUCH_URL', 'DATABASE_NAME', 'CHANGES_FEED' ]\n    }\n  });\n  return app.toTree();\n};\n```\n\nBuild your app without `.env` or keep it for defaults.\n\n```\n$ ember build -prod\n$ cd dist\n$ npm install\n```\n\nOverride `.env` defaults with environment variables when running in FastBoot:\n\n``` javascript\n// fastboot-server.js\nconst app = express();\napp.get('/*', fastboot('./dist'));\napp.listen(3000);\n```\n\n```\n$ COUCH_URL=http://server:5984 ./fastboot-server.js\n```\n\n## Configuration lookup in the app (FastBoot and Browser)\n\n``` javascript\n// app/instance-initializers/store.js\n\nexport default {\n  name: 'app:store',\n  after: 'ember-cli-fastboot-dotenv',\n  initialize(app) {\n    let dotenv = app.lookup('service:dotenv');\n\n    let {\n      couchURL,\n      databaseName,\n      changesFeed\n    } = dotenv.getProperties('couchURL', 'databaseName', 'changesFeed');\n\n    // ...\n  }\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fampatspell%2Fember-cli-fastboot-dotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fampatspell%2Fember-cli-fastboot-dotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fampatspell%2Fember-cli-fastboot-dotenv/lists"}