{"id":15732258,"url":"https://github.com/alexhff/node-metrics","last_synced_at":"2026-01-08T10:44:54.052Z","repository":{"id":42445237,"uuid":"226535599","full_name":"AlexHff/node-metrics","owner":"AlexHff","description":"Simple web API to work on metrics","archived":false,"fork":false,"pushed_at":"2023-03-02T09:51:14.000Z","size":4461,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T08:13:09.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"EJS","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/AlexHff.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}},"created_at":"2019-12-07T15:32:02.000Z","updated_at":"2022-04-05T20:31:51.000Z","dependencies_parsed_at":"2024-10-24T23:17:17.423Z","dependency_job_id":"455a638d-9067-499e-a4c9-76e0231d75ec","html_url":"https://github.com/AlexHff/node-metrics","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexHff%2Fnode-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexHff%2Fnode-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexHff%2Fnode-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexHff%2Fnode-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexHff","download_url":"https://codeload.github.com/AlexHff/node-metrics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246409828,"owners_count":20772558,"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-10-04T00:08:46.388Z","updated_at":"2026-01-08T10:44:54.017Z","avatar_url":"https://github.com/AlexHff.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-metrics [![Build Status](https://travis-ci.com/AlexHff/node-metrics.svg?token=qewhLzzy4xorKFhMwTS6\u0026branch=master)](https://travis-ci.com/AlexHff/node-metrics) [![Coverage Status](https://coveralls.io/repos/github/AlexHff/node-metrics/badge.svg?branch=master)](https://coveralls.io/github/AlexHff/node-metrics?branch=master) [![HitCount](http://hits.dwyl.io/AlexHff/node-metrics.svg)](http://hits.dwyl.io/AlexHff/node-metrics)\n\nSimple web API to work on metrics\n\n## Features\n\n  * Authentication\n  * CRUD users\n  * CRUD metrics\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nTo build and run this app locally you will need Node.js\n\n### Quick start\n\nClone the repository\n```bash\ngit clone https://github.com/AlexHff/node-metrics.git\ncd node-metrics\n```\n\nInstall dependencies\n```bash\nnpm install\n```\n\nPopulate database\n```bash\nnpm run populate\n```\n\nBuild and run the project\n```bash\nnpm run build\nnpm start\n```\n\nFinally, navigate to `http://localhost:8081` and you should see the project being served and rendered locally.\n\n### Run in Docker\n\nThis app can also be launched in a Docker container. Go to the directory that has your Dockerfile and run the following command to build the Docker image.\n```bash\ndocker build -t node-metrics .\n```\n\nRunning your image with -d runs the container in detached mode, leaving the container running in the background. The -p flag redirects a public port to a private port inside the container. Run the image you previously built:\n```bash\ndocker run -p 8081:8081 -d node-metrics\n```\n\nNow open `http://localhost:8081` and you should see the app running locally.\n\n## Running the tests\n\nRun unit tests\n```bash\nnpm test\n```\n\n## Deployment\n\nThis application has been deployed to an Elastic Beanstalk environment on AWS.\n\n### Deploy a Container with a Dockerfile\n\nUse the Elastic Beanstalk CLI (EB CLI) to configure your local repository for deployment to Elastic Beanstalk.\n\n```bash\neb init -p docker \u003capplication-name\u003e\n```\n\nAfter testing your application locally, deploy it to an Elastic Beanstalk environment. Elastic Beanstalk uses the instructions in your Dockerfile to build and run the image.\n\nUse the EB CLI to create an environment and deploy your application.\n\n```bash\neb create \u003cenvironment-name\u003e\n```\n\nOnce your environment has launched, use eb open to view it in a web browser.\n\n```bash\neb open\n```\n\n## Built With\n\n* [Express](https://expressjs.com/) - Fast, unopinionated, minimalist web framework for Node.js\n* [EJS](https://ejs.co/) - Embedded JavaScript templating\n* [Level](https://github.com/Level/level) - Fast \u0026 simple storage\n* [Passport](http://www.passportjs.org/docs/) - Authentication middleware for Node\n* [Chart.js](https://www.chartjs.org/docs/latest/) - Simple yet flexible JavaScript charting\n\n## Authors\n\n* [**Alexander Hoffmann**](https://github.com/AlexHff)\n* [**Hugo Fougeres**](https://github.com/LaGereFou)\n* [**Jeremy Roca**](https://github.com/jeremyroca)\n\nFor more information, see the [CONTRIBUTORS](CONTRIBUTORS.md) file\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## Routes\n\n\n| Method | Route | Description |\n| - | - | - |\n| GET | / | Displays the homepage |\n| GET | /login | Displays the login form |\n| POST | /login | Logs the user in |\n| GET | /logout | Signs out the current out |\n| GET | /signup | Displays the signup form |\n| POST | /signup | Adds a user |\n| GET | /user | Gets the current user |\n| GET | /metric | Gets all metrics |\n| GET | /metric/:id | Gets a metric given an id |\n| POST | /new | Adds a new metric |\n| POST | /update | Updates an existing metric |\n| POST | /delete | Deletes a metric |\n\n## Acknowledgments\n\n* [**Sergei Kudinov**](https://github.com/sergkudinov) for providing valuable pieces of code related to this project\n* [**startbootstrap-sb-admin-2**](https://github.com/BlackrockDigital/startbootstrap-sb-admin-2) for the admin dashboard template\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexhff%2Fnode-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexhff%2Fnode-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexhff%2Fnode-metrics/lists"}