All Projects → redislabs-training → ru102js

redislabs-training / ru102js

Licence: MIT license
Source code for the RU102JS Redis for JavaScript Developers Course

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
lua
6591 projects

Projects that are alternatives of or similar to ru102js

tempat-kontributor
Merupakan tempat bagi kalian untuk berkontributor bersama kami
Stars: ✭ 33 (+57.14%)
Mutual labels:  hacktoberfest2021
PracticeApp
A "must-have a look" project for newcomers in android.
Stars: ✭ 38 (+80.95%)
Mutual labels:  hacktoberfest2021
Awesome-Machine-Learning-Models
Contribute your amazing Machine Learning, Data Science, and Deep Learning repository
Stars: ✭ 16 (-23.81%)
Mutual labels:  hacktoberfest2021
frontendstudygroup.github.io
Web application for the frontend study group from WomenWhoCode Frontend track.
Stars: ✭ 15 (-28.57%)
Mutual labels:  hacktoberfest2021
stopwatch
Stop watch using javascript
Stars: ✭ 18 (-14.29%)
Mutual labels:  hacktoberfest2021
cruk-summer-school-2018
Summer school course materials collection
Stars: ✭ 24 (+14.29%)
Mutual labels:  training-materials
DesktopAssistant
A Virtual Desktop Assistant Written in Python
Stars: ✭ 579 (+2657.14%)
Mutual labels:  hacktoberfest2021
JavaScript-A-Z-Notes
Trying to document all of my knowledge about Javascript for future reference. Get your JS fundas in lucid English right here!
Stars: ✭ 306 (+1357.14%)
Mutual labels:  hacktoberfest2021
Top-Ethical-Hacking-Resources
Stay up-to-date with the latest and greatest ethical hacking tools and resources.
Stars: ✭ 22 (+4.76%)
Mutual labels:  hacktoberfest2021
Certificate-Generator-UI
This is the UI for an awesome Certificate Generator and this is a part of Hacktoberfest 2021.
Stars: ✭ 18 (-14.29%)
Mutual labels:  hacktoberfest2021
react-carousel-minimal
React.js Responsive Minimal Carousel
Stars: ✭ 76 (+261.9%)
Mutual labels:  hacktoberfest2021
python-functions-and-modules
Python3 teaching materials for functions and modules (1 day)
Stars: ✭ 13 (-38.1%)
Mutual labels:  training-materials
hacktoberfest2021
For Beginners, students and developers this is a great opportunity to learn and contribute to open source.
Stars: ✭ 79 (+276.19%)
Mutual labels:  hacktoberfest2021
hacktoberfest 2021
This is a repository for anyone wishing to contribute to HacktoberFest 2021
Stars: ✭ 51 (+142.86%)
Mutual labels:  hacktoberfest2021
file manager
FileManager is a wonderful widget that allows you to manage files and folders, pick files and folders, and do a lot more. Designed to feel like part of the Flutter framework.
Stars: ✭ 38 (+80.95%)
Mutual labels:  hacktoberfest2021
o-fish-realm
Realm application code and sample data for the Officer's Fishery Information Sharing Hub (O-FISH). The mobile app allows fisheries officers to document and share critical information gathered during a routine vessel inspection. The web app allows agencies to gain insights from the aggregated information.
Stars: ✭ 23 (+9.52%)
Mutual labels:  hacktoberfest2021
scylla-cdc-source-connector
A Kafka source connector capturing Scylla CDC changes
Stars: ✭ 19 (-9.52%)
Mutual labels:  nosql
Video-Chat
Video calling and chatting app (PWA) built using React.js, Web RTC and Socket.io
Stars: ✭ 305 (+1352.38%)
Mutual labels:  hacktoberfest2021
react-bootcamp-notes
Bu repo Kodluyoruz Earlybird Front-End Talent Bootcamp boyunca aldığım tüm notları saklar.
Stars: ✭ 60 (+185.71%)
Mutual labels:  hacktoberfest2021
Wizard-Of-Docs
A open source project to bring all the data structures and algorithms docs under one repository.
Stars: ✭ 19 (-9.52%)
Mutual labels:  hacktoberfest2021

RediSolar for Node.js

Preview of running application - Solar Site Map with markers

Introduction

This is the sample application codebase for RU102JS, Redis for JavaScript Developers at Redis University.

Solutions to the course programming challenges can be found on the solutions branch.

Prerequisites

In order to start and run this application, you will need:

  • Node.js (8.9.4 or newer, we recommend using the current Long Term Stable version)
  • npm (installed with Node.js)
  • Access to a local or remote installation of Redis version 5 or newer (local preferred)
  • If you want to try the RedisTimeSeries exercises, you'll need to make sure that your Redis installation also has the RedisTimeSeries Module installed

If you're using Windows, check out the following resources for help with running Redis:

Setup

To get started:

$ npm install

You'll also need to have the RedisTimeSeries module installed, which you can get by going through the following steps:

  • Install Docker and Docker Compose
  • Check your Docker Compose version using docker-compose --version. In order for our compose file to work, you need to have at least v1.27.0.
  • Start up the Docker daemon.
  • Run docker-compose up -d in the project directory. This command will give you Redis on localhost port 6379 with no password required, with the required RedisTimeSeries module installed. The container will persist Redis data to the redisdata folder.

You should see the following once the command has successfully run:

You'll also see the ru102js container running if you open up the Docker app.

If you get an error that says something like Version in "./docker-compose.yml" is unsupported, you probably need to update your docker compose version to 1.27.0 or higher.

If you want to shut down the Redis container, you can run docker-compose down.

Configuration

The application uses a configuration file, config.json to specify the port that it listens on plus some logging parameters and how it connects to a database.

The supplied config.json file is already set up to use Redis on localhost port 6379. Change these values if your Redis instance is on another host or port, or requires a password to connect.

{
  "application": {
    "port": 8081,
    "logLevel": "debug",
    "dataStore": "redis"
  },
  "dataStores": {
    "redis": {
      "host": "localhost",
      "port": 6379,
      "password": null,
      "keyPrefix": "ru102js"
    }
  }
}

The keyPrefix for Redis is used to namespace all the keys that the application generates or references. So for example a key sites:999 would be ru102js:sites:999 when written to Redis.

Load Sample Data

To load sample site data and sample metrics, run:

npm run load src/resources/data/sites.json flushdb

flushdb is optional, and will erase ALL data from Redis before inserting the sample data.

The application uses the key prefix ru102js by default, so you should be able to use the same Redis instance for this application and other data if necessary.

Development Workflow

In order to speed up development, you can run the application using nodemon, so that any changes to source code files cause the server to reload and start using your changes.

npm run dev

Edit code, application will hot reload on save.

If you want to run without nodemon, use:

npm start

But you will then need to stop the server and restart it when you change code.

Accessing the Front End Web Application

You should be able to see the front end solar dashboard app at:

http://localhost:8081/

Running Tests

The project is setup to use Jest for testing. To run all tests:

npm test

To run a specific suite of tests (e.g. those in tests/basic.test.js):

npm test -t basic

To run Jest continuously in watch mode, which gives you access to menus allowing you to run subsets of tests and many more options:

npm testdev

Linting

This project uses ESLint with a slightly modified version of the Airbnb JavaScript Style Guide.

  • The file .eslintrc contains a short list of rules that have been disabled for this project.
  • The file .eslintignore contains details of paths that the linter will not consider when linting the project.

To run the linter:

npm run lint

Subscribe to our YouTube Channel / Follow us on Twitch

We'd love for you to check out our YouTube channel, and subscribe if you want to see more Redis videos! We also stream regularly on our Twitch.tv channel - follow us to be notified when we're live.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].