transforming js
Microservice for transforming data in a pipe.
The service is based on the piveau-pipe-connector library. Any configuration applicable for the pipe-connector can also be used for this service.
Table of Contents
Build
Requirements:
- Git
- Docker
$ git clone <repo-uri>
$ cd <repo>
$ docker build -t piveau/<service-name> .
Run
$ docker run -it -p 8080:8080 piveau/<service-name>
Configuration
Pipe
The transformer can be configured through the config object as part of the segment body of the pipe. It allows the configuration of either embedding the script directly in the config object or passing a reference to a git repository:
mandatory
-
scriptType
-
embedded
Fieldscript
contains the scripts directly. -
localFile
Fieldpath
points to a local file inside thescripts
folder containing the script. -
repository
Fieldpath
points to the file containing the script in Git.
-
Example:
{
"scriptType": "repository",
"path": "path/in/git"
}
Environment
Variable | Description | Default Value |
---|---|---|
PIVEAU_PIPE_ENDPOINT_PORT |
Port at which the service accepts requests. | 8080 |
GIT_URI |
The Git repository URL | - |
GIT_USER_NAME |
The Git user name | - |
GIT_TOKEN |
The Git access token | - |
GIT_BRANCH |
The default branch to use when not specified in the pipe configuration | master |