ac

application-configurator

A configurator tool to extract properties from Spring Boot Config Server to a properties file or shell script for NodeJS

Showing:

Popularity

Downloads/wk

1

GitHub Stars

0

Maintenance

Last Commit

5yrs ago

Contributors

2

Package

Dependencies

6

Size (min+gzip)

29.8KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Application configurator reading Spring Cloud Config Server for NodeJS

Install

npm install application-configurator --save

Usage

const client = require("application-configurator");
client.properties_extractor("/opt/spark/conf", "spark", "http://configserver.myhost.com:8889", "spark-env.sh", "export")

Example

Configuring an application in general requires setting up initial shell scripts or properties which we will refer to via the --properties_file flag.

Writing to a properties file generally requires a tabular format where as initializing variables in a shell script will usually be written in an "export var1=value1" format which we can set via the --template flag. By default, it will assume tabular format. Otherwise specify "export".

That file will also be placed in a folder specific to the application, i.e. /opt/spark/conf, which we will set via the --folder flag.

We need the address of the spring cloud config server we will connect to via the --config_server_ip flag.

We need to know the application for which want to set its properties via the --application_name as the spring cloud config server can serve different properties for different applications.

The configurator can be called on the command line:

node examples/configure_command_line.js --folder "/opt/spark/conf" --config_server_ip "http://configserver.myhost.com:8889" --properties_file "spark-env.sh" --application_name "spark" --template export

It could also be ran via a function call:

const configurator = require("application-configurator");
configurator.properties_extractor("/opt/spark/conf", "spark", "http://configserver.myhost.com:8889", "spark-env.sh", "export")

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100