{"id":15091257,"url":"https://github.com/edixonalberto/api-hackernews-node","last_synced_at":"2025-04-19T14:41:28.040Z","repository":{"id":110612290,"uuid":"489782685","full_name":"EdixonAlberto/api-hackernews-node","owner":"EdixonAlberto","description":"API Rest to get related articles about Node.js in Hacker News","archived":false,"fork":false,"pushed_at":"2023-01-26T04:29:36.000Z","size":330,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T08:43:52.673Z","etag":null,"topics":["api","docker","docker-compose","gitlab-pipeline","graphql","hackernews","jwt-auth","nest","news","node","portfolio","restful-api","swagger-specification","typescript"],"latest_commit_sha":null,"homepage":"https://edixonalberto.github.io/api-hackernews-node/index.html","language":"TypeScript","has_issues":false,"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/EdixonAlberto.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}},"created_at":"2022-05-07T21:12:21.000Z","updated_at":"2023-05-17T02:41:12.000Z","dependencies_parsed_at":"2023-03-13T13:50:09.924Z","dependency_job_id":null,"html_url":"https://github.com/EdixonAlberto/api-hackernews-node","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/EdixonAlberto%2Fapi-hackernews-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdixonAlberto%2Fapi-hackernews-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdixonAlberto%2Fapi-hackernews-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdixonAlberto%2Fapi-hackernews-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdixonAlberto","download_url":"https://codeload.github.com/EdixonAlberto/api-hackernews-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249716478,"owners_count":21315066,"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":["api","docker","docker-compose","gitlab-pipeline","graphql","hackernews","jwt-auth","nest","news","node","portfolio","restful-api","swagger-specification","typescript"],"created_at":"2024-09-25T10:36:46.269Z","updated_at":"2025-04-19T14:41:28.023Z","avatar_url":"https://github.com/EdixonAlberto.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Hacker News Node\n\n![template](https://repository-images.githubusercontent.com/489782685/58ad8c53-7725-4e78-82fc-eb38f95e2c76)\n\n## Description\n\nApi to get related articles about Node.js in Hacker News.\n\nDocumentation \u0026#x279c; **[OpenAPI Specification](https://edixonalberto.github.io/api-hackernews-node/index.html)**\n\n---\n\n## Started\n\nA `.env` file must be created in the root of the project, for this you can execute the following command and copy the\nprovided variables template\n\n```sh\ncp template.env .env\n```\n\nAfter setting the environment variables the project can be executed in various ways. The `docker-compose.yml` file will\nread the `NODE_ENV` environment variable defined in the `.env` file to start the project in the correct environment.\n\n- In Docker\n\n```bash\n# no logs\ndocker-compose up -d\n\n# show logs\ndocker-compose up\n```\n\n\u003e NOTA: If you want to use the local database via docker-compose you should set this environment variable like this:\n\u003e `DB_HOST=db`\n\n- In Local\n\n```bash\n# run only the database\ndocker-compose up -d db\n\n# install dependencies locally\nnpm install\n\n# run app in development mode\nnpm run start:dev\n\n# run app in production mode\n$ npm run start:prod\n```\n\nTo fill the database for the first time you must use the following endpoint: `POST: /api/posts/refresh`, it will fill\nthe `posts` table for the first time and keep it updated **once a time**.\n\nThen a user must be created to authenticate and generate an **access token** and thus be able to interact with the other\nroutes.\n\nAll endpoints are documented in the following endpoint: `GET: /api/docs`\n\n## Testing\n\nIn the [/docs](/docs) folder there is a postman collection with all the endpoints ready to test\n\nBefore executing the e2e tests, make sure you have the database up and running. For this you can use the command:\n`docker-compose up -d db`\n\n- Test Commnands:\n\n```bash\n# unit tests\n$ npm run test\n\n# e2e tests\n$ npm run test:e2e\n\n# test coverage\n$ npm run test:cov\n```\n\n\u003e NOTA: Please note that this project was built and tested using the following technologies environment:\n\n- docker v20.10.13\n- docker-compose v1.29.2\n- node v16.14.2\n- npm v8.7.0\n- nestjs/cli v8.2.5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedixonalberto%2Fapi-hackernews-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedixonalberto%2Fapi-hackernews-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedixonalberto%2Fapi-hackernews-node/lists"}