Skip to content

Commit 191a985

Browse files
committed
updates
1 parent af10949 commit 191a985

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1148
-175
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Server Side Public License
1+
Server Side Public License
22
VERSION 1, OCTOBER 16, 2018
33

44
Copyright © 2018 MongoDB, Inc.

README.md

Lines changed: 41 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,35 @@ Awesome Redis GUI written in Electron, NodeJS and React
66

77
## Directory Structure
88

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.
1112
- `scripts` - Build scripts and other build-related files
1213
- `configs` - Webpack configuration files and other build-related files
13-
- `tests` - Contains the e2e
14+
- `tests` - Contains the e2e and integration tests.
1415

15-
## Prerequisites
16+
## Development Workflow
1617

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
2419

2520
```bash
2621
$ yarn install
2722
$ yarn --cwd redisinsight/api/
2823
```
2924

30-
## Development
25+
### Packaging the desktop app
3126

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:
3329

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
3538

3639
After you have installed all dependencies you can now run the app.
3740
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
4144
$ yarn start
4245
```
4346

44-
### Developing using web
47+
### Running frontend part of the app
4548

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.
4951

5052
```bash
5153
# Development
52-
$ yarn --cwd redisinsight/api/ start:dev
54+
$ yarn start:web
5355
```
5456

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
5858

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`.
6060

6161
```bash
6262
# Development
63-
$ yarn start:web
63+
$ yarn --cwd redisinsight/api/ start:dev
6464
```
6565

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.
8067

81-
```bash
82-
# Production
83-
$ yarn package:prod
84-
```
68+
### Building frontend part of the app
8569

86-
And packaged installer will be in the folder _./release_
70+
Run `yarn build:web` to build fronted to `/redisinsight/ui/dist/`.
8771

88-
### Create docker image
72+
## Docker
8973

9074
There are 2 different docker images available
9175

@@ -111,10 +95,10 @@ Example:
11195
```
11296

11397
```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
11599
```
116100

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
118102

119103
#### Build Docker with API only
120104

@@ -129,98 +113,25 @@ Example:
129113
```
130114

131115
```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
133117
```
134118

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
136120

137-
## Tests
121+
## Plugins documentation
138122

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)
140126

141-
#### Run UI unit tests
127+
## Continuous Integration
142128

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
178130

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
221132

222-
Run E2E tests
133+
- To run E2E tests run command:
223134

224135
```bash
225-
yarn --cwd tests/e2e test:chrome
136+
yarn test-chrome
226137
```

0 commit comments

Comments
 (0)