Files
openstapps/README.md
2019-04-17 08:56:24 +00:00

40 lines
1.0 KiB
Markdown

# @openstapps/api
Node.js library to interact with the StApps backend service
## Use this as a standalone program
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
into your local one.
Example to copy all Events of the b-tu instance:
```shell
npm install
npm run build
node ./lib/cli.js copy Event https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100
```
### Program arguments:
```shell
node ./lib/cli.js copy <type> <from> <to> <batchSize>
```
#### Options:
```shell
-s, --bulkSource <bulkScource>
```
The source identifier for the bulk to use with the target instance (default is 'copy')
```shell
-a, --appVersion <version>
```
The App version to use (unset by default)
### Example execution
with docker when backend is running on `localhost:3000`:
```shell
docker run --net=host registry.gitlab.com/openstapps/api/copy copy Place https://stappsbe01.innocampus.tu-berlin.de http://localhost:3000 100
```