=== Passing configuration to a verticle

Configuration in the form of JSON can be passed to a verticle at deployment time:

[source,javascript]
----
var config = {
 "name" : "tim",
 "directory" : "/blah"
};
var options = {
 "config" : config
};
vertx.deployVerticle("MyOrderProcessorVerticle.js", options);
----

This configuration is then available via the `link:../../vertx-core/js/jsdoc/context-Context.html[Context]` object.

The configuration is returned as a
JavaScript object so you can retrieve data as follows:

[source,javascript]
----
// The context object can be retrieve either using:
console.log("Configuration: " + Vertx.currentContext().config().name);
// or:
console.log("Configuration: " + vertx.getOrCreateContext().config().name);
----

NOTE: The access to the `context` object is made either using `link:../../vertx-core/js/jsdoc/vertx-Vertx.html#currentContext[Vertx.currentContext]` or using
`link:../../vertx-core/js/jsdoc/vertx-Vertx.html#getOrCreateContext[getOrCreateContext]`.

=== Accessing environment variables in a Verticle

Environment variables and system properties are accessible from a verticle using the Java API:

[source,javascript]
----
console.log(java.lang.System.getProperty("foo"));
console.log(java.lang.System.getenv("HOME"));
----