@@ -6,32 +6,35 @@ Awesome Redis GUI written in Electron, NodeJS and React
6
6
7
7
## Directory Structure
8
8
9
- - ` redisinsight/ui ` - Contains the frontend code
10
- - ` redisinsight/api ` - Contains the backend code
9
+ - ` redisinsight/ui ` - Contains the frontend code.
10
+ - ` redisinsight/api ` - Contains the backend code.
11
+ - ` docs ` - Contains the documentation.
11
12
- ` scripts ` - Build scripts and other build-related files
12
13
- ` configs ` - Webpack configuration files and other build-related files
13
- - ` tests ` - Contains the e2e
14
+ - ` tests ` - Contains the e2e and integration tests.
14
15
15
- ## Prerequisites
16
+ ## Development Workflow
16
17
17
- Make sure you have installed following packages:
18
- * [ Node] ( https://nodejs.org/en/download/ ) >=14.x and <16
19
- * [ yarn] ( https://www.npmjs.com/package/yarn ) >=1.21.3
20
-
21
- ## Installation
22
-
23
- Before development or build you have to install required dependencies
18
+ ### Installation
24
19
25
20
``` bash
26
21
$ yarn install
27
22
$ yarn --cwd redisinsight/api/
28
23
```
29
24
30
- ## Development
25
+ ### Packaging the desktop app
31
26
32
- There are 2 ways to develop:
27
+ After you have installed all dependencies you can package the app.
28
+ Run ` yarn package:prod ` to package app for the local platform:
33
29
34
- ### Developing using electron app
30
+ ``` bash
31
+ # Production
32
+ $ yarn package:prod
33
+ ```
34
+
35
+ And packaged installer will be in the folder _ release_
36
+
37
+ ### Running the desktop app
35
38
36
39
After you have installed all dependencies you can now run the app.
37
40
Run ` yarn start ` to start an electron application that will watch and build for you.
@@ -41,51 +44,32 @@ Run `yarn start` to start an electron application that will watch and build for
41
44
$ yarn start
42
45
```
43
46
44
- ### Developing using web
47
+ ### Running frontend part of the app
45
48
46
- #### Running backend part of the app
47
-
48
- Run ` yarn --cwd redisinsight/api/ start:dev ` to start a local API at ` localhost:5000 ` .
49
+ After you have installed all dependencies you can now run the app.
50
+ Run ` yarn start:web ` to start a local server that will watch and build for you.
49
51
50
52
``` bash
51
53
# Development
52
- $ yarn --cwd redisinsight/api/ start:dev
54
+ $ yarn start:web
53
55
```
54
56
55
- While the API is running, open your browser and navigate to http://localhost:5000/api/docs . You should see the Swagger UI.
56
-
57
- #### Running frontend part of the app
57
+ ### Running backend part of the app
58
58
59
- Run ` yarn start:web ` to start a local server for UI .
59
+ After you have installed all dependencies run ` yarn --cwd redisinsight/api/ start:dev ` to start a local API at ` localhost:5000 ` .
60
60
61
61
``` bash
62
62
# Development
63
- $ yarn start:web
63
+ $ yarn --cwd redisinsight/api/ start:dev
64
64
```
65
65
66
- Web interface will be available at http://localhost:8080
67
-
68
- Now servers will watch for changes and automatically build for you
69
-
70
- ## Build
71
-
72
- ### Packaging the desktop app
73
-
74
- #### Building statics for enablement area and default plugins
75
-
76
- Run ` yarn build:statics ` or ` yarn build:statics:win ` for Windows
77
-
78
- After you have installed all dependencies you can package the app.
79
- Run ` yarn package:prod ` to package app for the local platform:
66
+ While the API is running, open your browser and navigate to http://localhost:5000/api/docs . You should see the Swagger UI.
80
67
81
- ``` bash
82
- # Production
83
- $ yarn package:prod
84
- ```
68
+ ### Building frontend part of the app
85
69
86
- And packaged installer will be in the folder _ ./release _
70
+ Run ` yarn build:web ` to build fronted to ` /redisinsight/ui/dist/ ` .
87
71
88
- ### Create docker image
72
+ ## Docker
89
73
90
74
There are 2 different docker images available
91
75
@@ -111,10 +95,10 @@ Example:
111
95
```
112
96
113
97
``` bash
114
- docker run -p 5000 :5000 -d --cap-add ipc_lock redisinsight
98
+ docker run -p 5006 :5000 -d --cap-add ipc_lock redisinsight
115
99
```
116
100
117
- Then api docs and main ui should be available on http://localhost:5000 /api/docs and http://localhost:5000
101
+ Then api docs and main ui should be available on http://localhost/api/docs and http://localhost
118
102
119
103
#### Build Docker with API only
120
104
@@ -129,98 +113,25 @@ Example:
129
113
```
130
114
131
115
``` bash
132
- docker run -p 5000 :5000 -d --cap-add ipc_lock api.redisinsight
116
+ docker run -p 5006 :5000 -d --cap-add ipc_lock api.redisinsight
133
117
```
134
118
135
- Then api docs and main ui should be available on http://localhost:5000 /api/docs
119
+ Then api docs and main ui should be available on http://localhost/api/docs
136
120
137
- ## Tests
121
+ ## Plugins documentation
138
122
139
- ### Running frontend tests
123
+ * [ Introduction] ( docs/plugins/introduction.md )
124
+ * [ Installation and Usage] ( docs/plugins/installation.md )
125
+ * [ Plugin Development] ( docs/plugins/development.md )
140
126
141
- #### Run UI unit tests
127
+ ## Continuous Integration
142
128
143
- ``` bash
144
- yarn test
145
- ```
146
-
147
- ### Running backend tests
148
-
149
- #### Run backend unit tests
150
-
151
- ``` bash
152
- # Plain tests
153
- yarn --cwd redisinsight/api test
154
-
155
- # Tests with coverage
156
- yarn --cwd redisinsight/api test:cov
157
- ```
158
-
159
- ### Run backend integration tests (using local server)
160
-
161
- ``` bash
162
- # Plain tests
163
- yarn --cwd redisinsight/api test:api
164
-
165
- # Tests with coverage
166
- yarn --cwd redisinsight/api test:api:cov
167
- ```
168
-
169
- > ** _ NOTE_ ** : Using ` yarn test:api* ` scripts you should have redis server up and running.
170
- By default tests will look on ` localhost:6379 ` without any auth
171
- To customize tests configs you should run test with proper environment variables
172
-
173
- Example:
174
-
175
- If you have redis server running on a different host or port ` somehost:7777 ` with default user pass ` somepass `
176
-
177
- You should run test commands with such environment variables
129
+ ## Related Repositories
178
130
179
- ``` bash
180
- # Plain tests
181
- TEST_REDIS_HOST=somehost \
182
- TEST_REDIS_PORT=7777 \
183
- TEST_REDIS_PASSWORD-somepass \
184
- yarn --cwd redisinsight/api test:api
185
- ```
186
-
187
- You can find all possible environment variable available in the [ constants.ts] ( redisinsight/api/test/helpers/constants.ts ) file
188
-
189
- ### Run backend integration tests (using docker)
190
-
191
- Here you should not care about tests and local redis database configuration
192
-
193
- We will spin up server inside docker container and run tests over it
194
-
195
- ``` bash
196
- # run this this command
197
- ./redisinsight/api/test/test-runs/start-test-run.sh -r oss-st-6
198
- ```
199
- - -r - is the Redis Test Environment name
200
-
201
- We are supporting several test environments to run tests on various Redis databases:
202
- - ** oss-st-5** - _ OSS Standalone v5_
203
- - ** oss-st-5-pass** - _ OSS Standalone v5 with admin pass required_
204
- - ** oss-st-6** - _ OSS Standalone v6 and all modules_
205
- - ** oss-st-6-tls** - _ OSS Standalone v6 with TLS enabled_
206
- - ** oss-st-6-tls-auth** - _ OSS Standalone v6 with TLS auth required_
207
- - ** oss-clu** - _ OSS Cluster_
208
- - ** oss-clu-tls** - _ OSS Cluster with TLS enabled_
209
- - ** oss-sent** - _ OSS Sentinel_
210
- - ** re-st** - _ Redis Enterprise with Standalone inside_
211
- - ** re-clu** - _ Redis Enterprise with Cluster inside_
212
-
213
-
214
- ### Running E2E tests
215
-
216
- Install E2E tests deps
217
-
218
- ``` bash
219
- yarn --cwd tests/e2e
220
- ```
131
+ ## Running e2e tests in root tests/e2e
221
132
222
- Run E2E tests
133
+ - To run E2E tests run command:
223
134
224
135
``` bash
225
- yarn --cwd tests/e2e test: chrome
136
+ yarn test- chrome
226
137
```
0 commit comments