{"id":23468426,"url":"https://github.com/ecelis/nutricion-energetica","last_synced_at":"2026-04-11T14:35:10.012Z","repository":{"id":38063929,"uuid":"488664128","full_name":"ecelis/nutricion-energetica","owner":"ecelis","description":"Meal plan generator RESTful API","archived":false,"fork":false,"pushed_at":"2023-07-25T00:57:43.000Z","size":1529,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T21:39:36.339Z","etag":null,"topics":["expressjs","javascript","mongodb","nodejs","showcase"],"latest_commit_sha":null,"homepage":"https://healthcoach.app.patito.club","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/ecelis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2022-05-04T16:30:47.000Z","updated_at":"2024-12-21T18:38:18.000Z","dependencies_parsed_at":"2024-12-24T13:53:24.931Z","dependency_job_id":"36f1da2b-2044-48a8-a7ce-b0a8b1ce8cc0","html_url":"https://github.com/ecelis/nutricion-energetica","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ecelis/nutricion-energetica","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecelis%2Fnutricion-energetica","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecelis%2Fnutricion-energetica/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecelis%2Fnutricion-energetica/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecelis%2Fnutricion-energetica/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecelis","download_url":"https://codeload.github.com/ecelis/nutricion-energetica/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecelis%2Fnutricion-energetica/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31684525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["expressjs","javascript","mongodb","nodejs","showcase"],"created_at":"2024-12-24T13:53:12.262Z","updated_at":"2026-04-11T14:35:09.961Z","avatar_url":"https://github.com/ecelis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# healthcoach API\n\nI started this project to dust off my JavaScript skills and learn [Sequelize](https://sequelize.org/) and 💅🏾[styled-components](https://styled-components.com/) in the process. Also as a showoff to potential employers while I was in the hunt for a new job.\n\nThis is the RESTful API for [Web Health Coach](https://github.com/ecelis/healtcoach).\n\n## Dependencies\n\nRequires a Sendgrid account\n\n## Develop\n\n### Environment setup\n\nThere are two config files, this is redundant and will be fixed in the near future.\n\nCopy `cp config/sample.config.json config/config.json` and edit `config/config.json` with proper values.\n\nCopy `cp env.sample .env.local` and edit `.env.local` with proper values.\n\n### Docker\n\nAzure currently runs PostgreSQL 13.7\n\n```\ndocker compose up -d\n```\n\n```\ndocker build -t whcapi .\n```\n\n### Migrate\n\n```\nnpm run migrate\n```\n\nTo undo all migrations\n\n```\nnpm run migrate:undo\n```\n\n### Install and run with `nodemon`\n\n```\nnpm install -g nodemon\nnodemon\n``` \n\n## Test\n\nRun test environment first\n\nExecute tests\n\n```\nnpm run test\n```\n\n## Clean and import food data\n\n```\n.mode csv\n.import data/food.csv food\n```\n\n## Deploy\n\n### Publish API docker image to Azure Container Registry\n\nBuild image\n\n```\naz acr build --registry webhealthcoach --image api .\n```\n\nTODO (something about amin user enabled for related tasks in Azure)\nEnable ??? \n\n```\naz acr update -n webhealthcoach --admin-enabled true\n```\n\nCreate task to deploy container when new images are published in the registry.\n\n```az acr task create --registry webhealthcoach --name buildapi \\\n    --image api \\\n    --context https://github.com/ecelis/nutricion-energetica.git \\\n    --file Dockerfile --git-access-token \u003cgithub personla token\u003e\n```\n\n### Garbage\n\n```\ndocker run -d --name whcapi -p 3000:3000 --env-file=.env.docker --link whcdb whcapi\n```\n\n```\npsql \"host=\u003csomedb\u003e.postgres.database.azure.com port=5432 \\\n    dbname=\u003cdb\u003e user=\u003cuser\u003e password=\u003cpasswoord\u003e sslmode=require\"\n```\n```\npsql -Uwhcuser -dwhc_dev\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecelis%2Fnutricion-energetica","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecelis%2Fnutricion-energetica","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecelis%2Fnutricion-energetica/lists"}