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
Copy file name to clipboardExpand all lines: README.md
+23-21Lines changed: 23 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# RediSolar for Node.js
2
2
3
+

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