{"id":18256923,"url":"https://github.com/mediacomem/rps","last_synced_at":"2025-07-04T15:39:03.240Z","repository":{"id":44845964,"uuid":"318191424","full_name":"MediaComem/rps","owner":"MediaComem","description":"Rock Paper Scissors","archived":false,"fork":false,"pushed_at":"2023-01-11T03:13:58.000Z","size":872,"stargazers_count":1,"open_issues_count":20,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-11T12:04:49.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/MediaComem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-03T12:48:49.000Z","updated_at":"2021-07-08T00:12:55.000Z","dependencies_parsed_at":"2023-02-09T00:30:24.538Z","dependency_job_id":null,"html_url":"https://github.com/MediaComem/rps","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Frps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Frps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Frps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaComem%2Frps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MediaComem","download_url":"https://codeload.github.com/MediaComem/rps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223151800,"owners_count":17096178,"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-11-05T10:24:09.445Z","updated_at":"2024-11-05T10:24:10.130Z","avatar_url":"https://github.com/MediaComem.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rock Paper Scissors\n\n\u003e \"Life is more fun if you play games.\"\n\u003e — Roald Dahl\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Requirements](#requirements)\n- [Usage](#usage)\n  - [Initial setup](#initial-setup)\n  - [Updating](#updating)\n  - [Local development](#local-development)\n  - [Production deployment](#production-deployment)\n- [Configuration](#configuration)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\n\n## Requirements\n\n* [Node.js][node] 14+\n* [PostgreSQL][postgres] 12+\n\n\n\n## Usage\n\n### Initial setup\n\nInstall and configure the application:\n\n```bash\n# Clone the repository.\ngit clone https://github.com/MediaComem/rps.git\n\n# Install dependencies.\ncd rps\nnpm ci\n\n# Create a PostgreSQL user named \"rps\".\nsudo -u postgres createuser --pwprompt rps\n\n# Create an empty PostgreSQL database named \"rps\" and owned by the \"rps\" user.\nsudo -u postgres createdb --owner rps rps\n\n# Create the \"uuid-ossp\" PostgreSQL extension in the \"rps\" database.\nsudo -u postgres psql -d rps -c 'CREATE EXTENSION \"uuid-ossp\"'\n\n# Create a .env file and edit it to adapt the PostgreSQL connection URL\n# according to the user and database you just created.\ncp .env.sample .env\n```\n\nIf you are in a **memory-constrained environment** such as a small cloud server,\ninstall the pre-compiled version of the application which will be downloaded\nfrom GitHub:\n\n```bash\nnpm run build:precompiled\n```\n\n*Otherwise*, you can perform a full build, which requires copious amounts of CPU\nand RAM:\n\n```bash\nnpm run build\n```\n\nOnce the build is done, migrate the database to the latest version:\n\n```bash\nnpm run migrate\n```\n\n### Updating\n\nTo take all changes into account after updating the code to the latest version,\nexecute the following commands in the application's directory:\n\n```bash\n# Update dependencies (install new ones and upgrade existing ones).\nnpm install\n\n# Install the pre-compiled build or build the application again (one or the\n# other depending on your server's capabilities).\nnpm run build:precompiled\nnpm run build\n\n# Migrate the database to the latest version.\nnpm run migrate\n```\n\n### Local development\n\n\u003e **WARNING:** do **NOT** do this in **memory-constrained** environments such as\n\u003e a small cloud server. This is intended for development on your local machine.\n\n```bash\n# Run the application in development mode with live code reload.\nnpm run dev\n```\n\n### Production deployment\n\n```bash\n# Run the application in production mode.\nnpm start\n```\n\n\n\n## Configuration\n\nThe following environment variables can be set to customize the application's\nbehavior:\n\nVariable                             | Default value                    | Description\n:----------------------------------- | :------------------------------- | :------------------------------------------------\n`RPS_DATABASE_DEBUG`                 | `false`                          | When true, database queries are logged.\n`RPS_DATABASE_URL` or `DATABASE_URL` | `postgresql://rps@localhost/rps` | PostgreSQL connection URL.\n`RPS_PORT` or `PORT`                 | `3000`                           | The port on which the application will listen to.\n\n\n\n[node]: https://nodejs.org\n[postgres]: https://www.postgresql.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediacomem%2Frps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmediacomem%2Frps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediacomem%2Frps/lists"}