{"id":44079252,"url":"https://github.com/omerio/employee-microservice-node","last_synced_at":"2026-02-08T08:34:02.617Z","repository":{"id":18718603,"uuid":"85147679","full_name":"omerio/employee-microservice-node","owner":"omerio","description":"Example Node.js CRUD microservice for an Employee entity","archived":false,"fork":false,"pushed_at":"2022-12-06T20:37:25.000Z","size":281,"stargazers_count":38,"open_issues_count":18,"forks_count":20,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-04-14T19:32:08.276Z","etag":null,"topics":["coverage","microservice","nodejs","unit-testing"],"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/omerio.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":"2017-03-16T03:20:38.000Z","updated_at":"2024-03-01T00:27:49.000Z","dependencies_parsed_at":"2023-01-11T20:29:40.106Z","dependency_job_id":null,"html_url":"https://github.com/omerio/employee-microservice-node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omerio/employee-microservice-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omerio%2Femployee-microservice-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omerio%2Femployee-microservice-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omerio%2Femployee-microservice-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omerio%2Femployee-microservice-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omerio","download_url":"https://codeload.github.com/omerio/employee-microservice-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omerio%2Femployee-microservice-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29225478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T06:05:31.539Z","status":"ssl_error","status_checked_at":"2026-02-08T05:58:33.853Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["coverage","microservice","nodejs","unit-testing"],"created_at":"2026-02-08T08:34:00.431Z","updated_at":"2026-02-08T08:34:02.610Z","avatar_url":"https://github.com/omerio.png","language":"JavaScript","funding_links":[],"categories":["📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# employee-microservice-node\n\n[![CircleCI](https://circleci.com/gh/omerio/employee-microservice-node.svg?style=svg)](https://circleci.com/gh/omerio/employee-microservice-node) [![codecov](https://codecov.io/gh/omerio/employee-microservice-node/branch/master/graph/badge.svg)](https://codecov.io/gh/omerio/employee-microservice-node)\n\nExample Node.js CRUD microservice for an Employee entity with unit tests, mocking, code style checking and good test coverage. The microservice exposes REST APIs which are documented using [Swagger](http://swagger.io/).\n\n## Getting Started\n\n### Requirements:\n\n* [Node.js](https://nodejs.org/en/download/)\n* [Docker](https://www.docker.com/community-edition)\n\n### Checkout and run the code\n\n```bash\ngit clone https://github.com/omerio/employee-microservice-node.git\ncd employee-microservice-node\nnpm install\nnpm start\n```\n\nOnce the server is started you can access the following URLs:\n\n* Server: http://localhost:8000/\n* [Swagger](https://swagger.io/) API documentation: http://localhost:8000/docs\n\n![Alt text](./apis.png \"Employee Service APIs\")\n\n## Libraries\n\nThe following libraries are used in this project:\n\n- **Web Server Framework**: [hapi](https://hapijs.com/) with [swagger](https://github.com/glennjones/hapi-swagger) and [good](https://github.com/hapijs/good) plugins. [Boom](https://github.com/hapijs/boom) for HTTP errors. [Request](https://github.com/request/request) for making HTTP requests\n- **Logging**: [winston](https://github.com/winstonjs/winston)\n- **Testing**: [mocha](https://mochajs.org/) with [chai](http://chaijs.com/) for [BDD](https://www.agilealliance.org/glossary/bdd) and [sinon](http://sinonjs.org/) for mocking\n- **Code Coverage**: [nyc](https://github.com/istanbuljs/nyc)\n- **Code Style**: [eslint](http://eslint.org/)\n- **Deployment**: [Docker](https://www.docker.com/community-edition)\n\n## Available build scripts\nThe available scripts are in the `package.json` file:\n\n* `npm start` - start the application\n* `npm run dev` - start the application in development mode, e.g. application reloads each time a change is made.\n* `npm test` -  run the unit tests, the results are printed to the screen\n* `npm run test-ci` -  run the unit tests, the results saved to a file to use in a Continous Integration tool\n* `npm run test-debug` -  run the tests enabling debug mode\n* `npm run coverage` -  run the code coverage\n* `npm run debug` -  run the app in debug mode\n* `npm run lint` -  run linting of the application code\n\n## Unit Tests and Coverage\n\nTo run the unit tests\n\n```bash\nnpm test\n```\n\nThe test results are printed to the screen. To produce the test results in junit format use the `npm run test-ci` script\n\nTo generate the code coverage reports:\n\n```bash\nnpm run coverage\n```\n\nThe coverage reports are available in HTML format in `employee-microservice-node/coverage/index.html`\n\n## CI-CD\nThis repository uses [CircleCI](https://circleci.com/gh/omerio/employee-microservice-node) for continuous integration and deployment. Circle CI configuration is in the [`circle.yml`](./circle.yml) file\n\nCode coverage results are uploaded to [CodeCov](https://codecov.io/gh/omerio/employee-microservice-node).\n\n## Docker\nThis microservice can be built as a docker container. See the [`Dockerfile`](./Dockerfile)\n\nTo build a docker image:\n```bash\ndocker build -t omerio/employee-microservice-node .\n```\n\nTo run the docker image:\n```bash\ndocker run -p 8000:8000 omerio/employee-microservice-node\n```\n\nPublish the image to [Docker Hub](https://hub.docker.com/), using your Docker Hub login details:\n```bash\ndocker login\ndocker push omerio/employee-microservice-node\n```\n\n## TODO\n- Continuous deployment using CircleCI\n- Add authentication\n- Add JSDocs support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomerio%2Femployee-microservice-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomerio%2Femployee-microservice-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomerio%2Femployee-microservice-node/lists"}