You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the sample application codebase for RU102JS, [Redis for JavaScript Developers](https://university.redis.com/courses/ru102js/) at [Redis University](https://university.redis.com).
@@ -10,15 +14,15 @@ Solutions to the course programming challenges can be found on the `solutions` b
10
14
11
15
In order to start and run this application, you will need:
12
16
13
-
*[Node.js](https://nodejs.org/en/download/) (8.9.4 or newer, we recommend using the current Long Term Stable version)
14
-
* npm (installed with Node.js)
15
-
* Access to a local or remote installation of [Redis](https://redis.io/download) version 5 or newer (local preferred)
16
-
* If you want to try the RedisTimeSeries exercises, you'll need to make sure that your Redis installation also has the [RedisTimeSeries Module](https://oss.redis.com/redistimeseries/) installed
17
+
-[Node.js](https://nodejs.org/en/download/) (8.9.4 or newer, we recommend using the current Long Term Stable version)
18
+
- npm (installed with Node.js)
19
+
- Access to a local or remote installation of [Redis](https://redis.io/download) version 5 or newer (local preferred)
20
+
- If you want to try the RedisTimeSeries exercises, you'll need to make sure that your Redis installation also has the [RedisTimeSeries Module](https://oss.redis.com/redistimeseries/) installed
17
21
18
22
If you're using Windows, check out the following resources for help with running Redis:
19
23
20
-
*[Redis Labs Blog - Running Redis on Windows 10](https://redis.com/blog/redis-on-windows-10/)
21
-
*[Microsoft - Windows Subsystem for Linux Installation Guide for Windows 10](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
24
+
-[Redis Labs Blog - Running Redis on Windows 10](https://redis.com/blog/redis-on-windows-10/)
25
+
-[Microsoft - Windows Subsystem for Linux Installation Guide for Windows 10](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
22
26
23
27
# Setup
24
28
@@ -28,12 +32,12 @@ To get started:
28
32
$ npm install
29
33
```
30
34
31
-
# Configuration
35
+
# Configuration
32
36
33
-
The application uses a configuration file, `config.json` to specify the port that it listens
34
-
on plus some logging parameters and how it connects to a database.
37
+
The application uses a configuration file, `config.json` to specify the port that it listens
38
+
on plus some logging parameters and how it connects to a database.
35
39
36
-
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.
40
+
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.
37
41
38
42
```
39
43
{
@@ -53,8 +57,8 @@ The supplied `config.json` file is already set up to use Redis on localhost port
53
57
}
54
58
```
55
59
56
-
The `keyPrefix` for Redis is used to namespace all the keys that the application generates or
57
-
references. So for example a key `sites:999` would be `ru102js:sites:999` when written to Redis.
60
+
The `keyPrefix` for Redis is used to namespace all the keys that the application generates or
61
+
references. So for example a key `sites:999` would be `ru102js:sites:999` when written to Redis.
58
62
59
63
# Load Sample Data
60
64
@@ -66,12 +70,12 @@ npm run load src/resources/data/sites.json flushdb
66
70
67
71
`flushdb` is optional, and will erase ALL data from Redis before inserting the sample data.
68
72
69
-
The application uses the key prefix `ru102js` by default, so you should be able to use the
73
+
The application uses the key prefix `ru102js` by default, so you should be able to use the
70
74
same Redis instance for this application and other data if necessary.
71
75
72
76
# Development Workflow
73
77
74
-
In order to speed up development, you can run the application using `nodemon`, so that any
78
+
In order to speed up development, you can run the application using `nodemon`, so that any
75
79
changes to source code files cause the server to reload and start using your changes.
76
80
77
81
```
@@ -90,15 +94,15 @@ But you will then need to stop the server and restart it when you change code.
90
94
91
95
# Accessing the Front End Web Application
92
96
93
-
You should be able to see the front end solar dashboard app at:
97
+
You should be able to see the front end solar dashboard app at:
94
98
95
99
```
96
100
http://localhost:8081/
97
101
```
98
102
99
103
# Running Tests
100
104
101
-
The project is setup to use [Jest](https://jestjs.io/en/) for testing. To run all tests:
105
+
The project is setup to use [Jest](https://jestjs.io/en/) for testing. To run all tests:
102
106
103
107
```
104
108
npm test
@@ -110,7 +114,7 @@ To run a specific suite of tests (e.g. those in `tests/basic.test.js`):
110
114
npm test -t basic
111
115
```
112
116
113
-
To run Jest continuously in watch mode, which gives you access to menus allowing you to run
117
+
To run Jest continuously in watch mode, which gives you access to menus allowing you to run
114
118
subsets of tests and many more options:
115
119
116
120
```
@@ -119,12 +123,12 @@ npm testdev
119
123
120
124
# Linting
121
125
122
-
This project uses [ESLint](https://eslint.org/) with a slightly modified version of the
126
+
This project uses [ESLint](https://eslint.org/) with a slightly modified version of the
0 commit comments