{"id":21413181,"url":"https://github.com/github0013/my-next-project","last_synced_at":"2025-03-16T18:23:05.576Z","repository":{"id":40929199,"uuid":"211429611","full_name":"github0013/my-next-project","owner":"github0013","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-04T11:35:33.000Z","size":472,"stargazers_count":0,"open_issues_count":16,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T05:15:48.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/github0013.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}},"created_at":"2019-09-28T02:02:00.000Z","updated_at":"2019-09-28T02:05:13.000Z","dependencies_parsed_at":"2023-02-02T10:46:49.644Z","dependency_job_id":null,"html_url":"https://github.com/github0013/my-next-project","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/github0013%2Fmy-next-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fmy-next-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fmy-next-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github0013%2Fmy-next-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github0013","download_url":"https://codeload.github.com/github0013/my-next-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910762,"owners_count":20367544,"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":[],"created_at":"2024-11-22T18:17:24.598Z","updated_at":"2025-03-16T18:23:05.535Z","avatar_url":"https://github.com/github0013.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [AS OF nextjs 9.0.6] how to use prcess.env VARS on now.sh server\n\n## use static env\n\nIf you don't use `.env`, then it works as is.\n\n[Build-time configuration][1]\n\n```js\n// next.config.js\nmodule.exports = {\n  env: {\n    customKey: \"value\",\n  },\n}\n```\n\n## use dotenv\n\nThis works on `yarn dev`, `yarn build \u0026\u0026 yarn start`, but not on now.sh\n\n```ini\n# dotenv\nCUSTOM_KEY=1234\n```\n\n```js\n// next.config.js\nmodule.exports = {\n  env: {\n    customKey: process.env.CUSTOM_KEY,\n  },\n}\n```\n\n## use dotenv on now.sh\n\n`process.env.CUSTOM_KEY` doesn't work out of the box.\n\n[Adding Secrets][2]\n\nrun `now secrets add from-dot-env 'from now secret'`, then add\n\n**now.json**\n\n```json\n{\n  \"build\": {\n    \"env\": {\n      \"CUSTOM_KEY\": \"@from-dot-env\"\n    }\n  }\n}\n```\n\nrun `now` and see the secrets shows on the screen.\n\n[1]: https://nextjs.org/docs#build-time-configuration\n[2]: https://zeit.co/docs/v2/build-step/#adding-secrets\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0013%2Fmy-next-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub0013%2Fmy-next-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub0013%2Fmy-next-project/lists"}