mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
docs: update README.md. Include e2e command usage
This commit is contained in:
36
README.md
36
README.md
@@ -3,37 +3,65 @@
|
|||||||
Node.js library to interact with the StApps backend service
|
Node.js library to interact with the StApps backend service
|
||||||
|
|
||||||
## Use this as a standalone program
|
## Use this as a standalone program
|
||||||
|
|
||||||
To get some data into a local `backend-node`-instance, you can run this
|
To get some data into a local `backend-node`-instance, you can run this
|
||||||
as a standalone program to copy data of a remote `backend-node`-instance
|
as a standalone program to copy data of a remote `backend-node`-instance
|
||||||
into your local one.
|
into your local one.
|
||||||
|
|
||||||
Example to copy all Events of the b-tu instance:
|
Example to copy all Events of the b-tu instance:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
node ./lib/cli.js copy Event https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100
|
node ./lib/cli.js copy Event https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100
|
||||||
```
|
```
|
||||||
|
|
||||||
### Program arguments:
|
Example to index all items from @openstapps/core test files to a backend:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
node ./lib/cli.js e2e http://localhost:3000
|
||||||
|
```
|
||||||
|
|
||||||
|
### Program arguments
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
node ./lib/cli.js copy <type> <from> <to> <batchSize>
|
node ./lib/cli.js copy <type> <from> <to> <batchSize>
|
||||||
|
|
||||||
|
node ./lib/cli.js e2e <to>
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Options:
|
#### Options
|
||||||
|
|
||||||
|
The source identifier for the bulk to use with the target instance (default is 'copy')
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
-s, --bulkSource <bulkScource>
|
-s, --bulkSource <bulkScource>
|
||||||
```
|
```
|
||||||
The source identifier for the bulk to use with the target instance (default is 'copy')
|
|
||||||
|
The App version to use (unset by default)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
-a, --appVersion <version>
|
-a, --appVersion <version>
|
||||||
```
|
```
|
||||||
The App version to use (unset by default)
|
|
||||||
|
The only available option for `e2e` command. File path to json test files each containing a SCThing.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
-s, --samples <path>
|
||||||
|
```
|
||||||
|
|
||||||
### Example execution
|
### Example execution
|
||||||
|
|
||||||
with docker when backend is running on `localhost:3000`:
|
with docker when backend is running on `localhost:3000`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker run --net=host registry.gitlab.com/openstapps/api/copy copy Place https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100
|
docker run --net=host registry.gitlab.com/openstapps/api/copy copy Place https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or using `e2e` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run --net=host registry.gitlab.com/openstapps/api/copy e2e http://localhost:3000
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user