https://github.com/loadmill/loadmill-db-relay-service
Enable customers to execute queries directly to their DB
https://github.com/loadmill/loadmill-db-relay-service
Last synced: about 2 months ago
JSON representation
Enable customers to execute queries directly to their DB
- Host: GitHub
- URL: https://github.com/loadmill/loadmill-db-relay-service
- Owner: loadmill
- License: apache-2.0
- Created: 2021-02-16T09:46:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-11T12:38:17.000Z (almost 2 years ago)
- Last Synced: 2025-03-23T02:13:15.553Z (about 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# loadmill-db-relay-service
[](https://opensource.org/licenses/Apache-2.0)
Loadmill's Database Relay Service provides a simple way to interact with your databases using HTTP requests as part of API and integration tests. By enabling the execution of queries directly to PostgreSQL, MySQL, Oracle, MongoDB, and Redis databases, it greatly simplifies the incorporation of databases in your API tests. The ability to query data sources and assert over the response during a test serves as a powerful tool for validating test results.
## Usage
Execute queries directly to postgres:
`https:///api/postgres`
```js
body: {
connectionString: 'postgres://...'
query: 'SELECT NOW()'
}
```
Execute queries directly to mysql:
`https:///api/mysql`
```js
body: {
connectionString: 'mysql://...'
query: 'SELECT NOW()'
}
```
Execute queries directly to oracle:
`https:///api/oracle`
```js
body: {
connectionString: 'host[:port][/service_name]'
user: 'database-user'
password: 'mypw'
query: 'SELECT * FROM table_name'
}
```
Execute queries directly to mongodb:
`https:///api/mongo`
```js
body: {
connectionString: 'mongodb://...'
collection: 'bios',
command: 'find',
query: { "awards.award": "Turing Award" }
}
```
Execute queries directly to redis:
`https:///api/redis`
```js
body: {
{
connectionString: "redis://...",
command:"get | hget | hgetall"
key:"any-key",
field: "any-field"
}
}
```
## Usage
Build docker image:
```js
docker build -t db-relay-service .
```
Build docker container:
```js
docker run -it -p 8080:8080 db-relay-service
```
Stop docker container:
```js
docker ps
docker stop ${CONTAINER ID}
```