{"id":19973976,"url":"https://github.com/marioblazek/redis-for-javascript-developers","last_synced_at":"2025-03-01T18:26:58.864Z","repository":{"id":41652560,"uuid":"259547881","full_name":"MarioBlazek/redis-for-javascript-developers","owner":"MarioBlazek","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-12T15:02:18.000Z","size":2363,"stargazers_count":0,"open_issues_count":16,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T09:32:08.084Z","etag":null,"topics":[],"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/MarioBlazek.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":"2020-04-28T06:11:27.000Z","updated_at":"2020-04-29T06:17:55.000Z","dependencies_parsed_at":"2023-01-27T21:15:47.582Z","dependency_job_id":null,"html_url":"https://github.com/MarioBlazek/redis-for-javascript-developers","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/MarioBlazek%2Fredis-for-javascript-developers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioBlazek%2Fredis-for-javascript-developers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioBlazek%2Fredis-for-javascript-developers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioBlazek%2Fredis-for-javascript-developers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarioBlazek","download_url":"https://codeload.github.com/MarioBlazek/redis-for-javascript-developers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241406581,"owners_count":19958012,"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-13T03:13:30.905Z","updated_at":"2025-03-01T18:26:58.841Z","avatar_url":"https://github.com/MarioBlazek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RediSolar for Node.js\n\n# Introduction\n\nThis is the sample application codebase for RU102JS, Redis for JavaScript developers.\n\n# Prerequisites\n\nIn order to start and run this application, you will need:\n\n* [Node.js](https://nodejs.org/en/download/) (8.9.4 or newer, we recommend using the current Long Term Stable version)\n* npm (installed with Node.js)\n* Access to a local or remote installation of [Redis](https://redis.io/download) version 5 or newer\n* Your Redis installation should have the RedisTimeSeries module installed.  Installation instructions can be found [here](https://oss.redislabs.com/redistimeseries/#setup)\n\n# Setup\n\nTo get started with the default configuration (server on port 8081, Redis on localhost port 6379):\n\n```\n$ npm install\n$ npm run dev\n```\n\nThis should start a live reloading server that uses [nodemon](https://www.npmjs.com/package/nodemon).  You should be able to see the front end solar dashboard app at: \n\n```\nhttp://localhost:8081/\n```\n\n# Configuration \n\nThe application uses a configuration file, `config.json` to specify the port that it listens \non plus some logging parameters and how it connects to a database.\n\nThere are two options for the database, `static` or `redis`.  `static` just returns static \nresponses and all write operations will do nothing.  It is included to show how you could \norganize your code using the DAO pattern when you might have more than one database type \nto consider.\n\nYou should use the `redis` database, and the supplied `config.json` file is already set up \nto use Redis on localhost port 6379.\n\n```\n{\n  \"application\": {\n    \"port\": 8081,\n    \"logLevel\": \"debug\",\n    \"dataStore\": \"redis\"\n  },\n  \"dataStores\": {\n    \"redis\": {\n      \"host\": \"localhost\",\n      \"port\": 6379,\n      \"keyPrefix\": \"ru102js\"\n    },\n    \"static\": {}\n  }\n}\n```\n\nThe `keyPrefix` for Redis is used to namespace all the keys that the application generates or \nreferences.  So for example a key 'sites:999' would be 'ru102js:sites:999' when written to Redis.\n\n# Load Sample Data\n\nTo load sample site data and sample metrics, run:\n\n```\nnpm run load src/resources/data/sites.json flushdb\n```\n\n`flushdb` is optional, and will erase ALL data from Redis before inserting the sample data.\n\nThe application uses the key prefix `ru102js` by default, so you should be able to use the \nsame Redis instance for this application and other data if necessary.\n\n# Development Workflow\n\nIn order to speed up development, you can run the application using `nodemon`, so that any \nchanges to source code files cause the server to reload and start using your changes.\n\n```\nnpm run dev\n```\n\nEdit code, application will hot reload on save.\n\n## Running Tests\n\nThe project is setup to use [Jest](https://jestjs.io/en/) for testing.  To run all tests:\n\n```\nnpm test\n```\n\nTo run a specific suite of tests (e.g. those in `tests/basic.test.js`):\n\n```\nnpm test -t basic\n```\n\nTo run Jest continuously in watch mode, which gives you access to menus allowing you to run \nsubsets of tests and many more options:\n\n```\nnpm testdev\n```\n\n## Linting\n\nThis project uses [ESLint](https://eslint.org/) with a slightly modified version of the \n[Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript).\n\n* The file `.eslintrc` contains a short list of rules that have been disabled for this project.\n* The file `.eslintignore` contains details of paths that the linter will not consider when \nlinting the project.\n\nTo run the linter:\n\n```\nnpm run lint\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioblazek%2Fredis-for-javascript-developers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarioblazek%2Fredis-for-javascript-developers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioblazek%2Fredis-for-javascript-developers/lists"}