{"id":22995459,"url":"https://github.com/alemarcha/ums","last_synced_at":"2026-04-08T11:32:57.160Z","repository":{"id":97311770,"uuid":"121483144","full_name":"alemarcha/UMS","owner":"alemarcha","description":"MongoDB, Express and NodeJS app. Using Swagger for Docs Api.","archived":false,"fork":false,"pushed_at":"2018-06-27T13:24:18.000Z","size":1223,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-03T14:31:18.259Z","etag":null,"topics":["docker","docker-compose","es6","express","istambul","javascript","jwt","mocha","mocha-chai","mongodb","mongoose","nginx","nodejs","passport","supertest","swagger","swagger-docs","travis","travis-ci","vscode"],"latest_commit_sha":null,"homepage":"","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/alemarcha.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-02-14T07:30:58.000Z","updated_at":"2019-09-17T16:46:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"23ed16b7-3a2e-4a00-9b6f-e785ef997b7e","html_url":"https://github.com/alemarcha/UMS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alemarcha/UMS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemarcha%2FUMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemarcha%2FUMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemarcha%2FUMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemarcha%2FUMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alemarcha","download_url":"https://codeload.github.com/alemarcha/UMS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alemarcha%2FUMS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31554093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","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":["docker","docker-compose","es6","express","istambul","javascript","jwt","mocha","mocha-chai","mongodb","mongoose","nginx","nodejs","passport","supertest","swagger","swagger-docs","travis","travis-ci","vscode"],"created_at":"2024-12-15T05:29:44.070Z","updated_at":"2026-04-08T11:32:57.128Z","avatar_url":"https://github.com/alemarcha.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UMS https://alemarcha.github.io/UMS/\n\n[![Build Status](https://travis-ci.org/alemarcha/UMS.svg?branch=master)](https://travis-ci.org/alemarcha/UMS)\n\nUser management system with MongoDB, Express and NodeJS app. Using Swagger for Docs Api.\n\n## Installation with Docker\n\nFirstable you need [Docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/install/) installed and internal or external MongoDB installed.\nYou can follow this links to [install docker on ubuntu 16-04es](https://www.digitalocean.com/community/tutorials/como-instalar-y-usar-docker-en-ubuntu-16-04-es) and [install docker-compose on ubuntu 16-04](https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-16-04).\n\nWe are using docker-compose file _version 3.0_, so maybe you need to update to at least that version:\n\n    curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose\n    chmod +x /usr/local/bin/docker-compose\n\nA `docker-compose.yml` looks like this:\n\n    version: \"3.5\"\n    services:\n    server:\n        build:\n        context: .\n        dockerfile: DockerfileServer\n        volumes:\n        - ./server:/app\n        - /app/node_modules\n        ports:\n        - \"3000:3000\"\n        command: \"npm run build-pm2\"\n\nUsing `docker-compose` (Use remote db or a local one in which we can share with other apps):\n\n### Development\n\n* To use a `remote_db`\n\nIf do you want to connect to a existing remote mongo server, you should write down in your dotenv file:\n\n    ENVIRONMENT=development\n\nAnd uncomment the following line:\n\n    DB_DEV=mongodb://{USER}:{PASSWORD}@{IP_DATABASE}:27017/database_ums\n\n* To use a `local_db`\n\nOr in the contrary you already has a mongo running in your set up, then you should type the info like this:\n\n    DB_DEV=mongodb://{YOUR_IP_DATABASE}:{YOUR_PORT_DATABASE}/database_ums\n\nIn this case, you need to write down your local ip where your mongo is, if you just type localhost this will not work.\n\n### Production\n\nSame steps that we note before in the case of development, for the production you only need to comment the development line and uncomment the production one.\n\nWe recommended created a new private and public keys for production environment instead of data/keys/jwt256.key and data/keys/jwt256.key.pub we have in our repo with development and testing purposes. You can create your keys following:\n\n    ssh-keygen -t rsa -b 4096 -f jwtRS256.key\n    #Without passphrase\n    openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub\n    cat jwtRS256.key\n    cat jwtRS256.key.pub\n\nYou can put wherever you want and put the path in your .env file to work with them. You never must publish your private key. You just should share your public key instead of private.\n\nJWT_PRIVATE_KEY_PATH=data/keys/jwtRS256.key\nJWT_PUBLIC_KEY_PATH=data/keys/jwtRS256.key.pub\n\n### Load balancing mode\n\nLoad balancing across multiple application instances is a commonly used technique for optimizing resource utilization, maximizing throughput, reducing latency, and ensuring fault-tolerant configurations.\n\nIt is possible to use nginx as a very efficient HTTP load balancer to distribute traffic to several application servers and to improve performance, scalability and reliability of web applications with nginx.\n\nWe use round-robin method.\n\nIf we want to deploy more than one instance and use load balancing we need to execute following command:\n\n         docker-compose up --scale server_1=num_of_instances_you_want\n\ninstead of docker just\n\n         docker-compose up\n\nwhich just will deploy one instance\n\n### Testing\n\nIn order to do our tests this will be the mongodb route in local:\n\n    DB_TEST=mongodb://localhost:27017/ums_test\n\n### Data storage\n\nWe are storing the mongo data in when we use utils-docker/docker-shared-mongo(Deprecated) or utils-docker/docker-compose-internal:\n\n      - ~/data/mongodb_data/:/data/db\n\nIf do you want to change this or the port used in order to connect with mongo, you can do this in the `docker-compose.yml` file.\n\n## Config your .env file\n\n1. Copy `.env-getting-started` and rename it to .env\n2. Config your `.env` file\n\nAfter you have installed both:\n\n1. git clone \u003chttps://github.com/alemarcha/UMS.git\u003e\n2. cd UMS\n3. docker-compose up\n4. You should see at localhost:8082 our swagger docs now.\n\n## Getting started without Docker\n\nFirstable you need Nodejs and MongoDB installed.\n\nAfter that you should follow next steps:\n\n1. git clone \u003chttps://github.com/alemarcha/UMS.git\u003e\n2. Install and init server.\n    * cd UMS/server\n    * npm install\n    * npm start\n\nYou should see at localhost:8082 our Swagger docs now.\n\n## Info for development\n\nWe are using Visual Studio Code to programming, if you are planning to replicate the way we are doing it, we recommend you to install the following extensions:\n\n`Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.`\n\n* Docker\n\n\u003e ext install PeterJausovec.vscode-docker\n\n* ESLint\n\n\u003e ext install dbaeumer.vscode-eslint\n\n* Prettier - Code formatter\n\n\u003e ext install esbenp.prettier-vscode\n\n* YAML support for vscode\n\n\u003e ext install redhat.vscode-yaml\n\n* Swagger Viewer (in order to preview the doc)\n\n\u003e ext install Arjun.swagger-viewer\n\n* Install pm2 with npm for server monitoring\n\n         npm install pm2@latest -g\n\n## Execute test with Mocha, chai and Supertest\n\n* cd UMS/server\n* npm install\n* npm run test\n\nYou will see results of testing in command line\n\n## Stress test http with hey\n\ncd ~/go/bin/\n./hey -n 5000 -c 500 http://localhost:8082/api/users/search\n\n### Moreover you could see our [travis CI](https://travis-ci.org/alemarcha/UMS)\n\n## Developers\n\nAlexis Martínez Chacón (alexis.martinez@juntadeandalucia.es)\n\nRubén García Serrano (onitaku@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falemarcha%2Fums","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falemarcha%2Fums","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falemarcha%2Fums/lists"}