@Override
public void initApp() {
RedisStore redis = addChild(EntitySpec.create(RedisStore.class)
.configure(SoftwareProcess.SUGGESTED_VERSION, "3.0.0"));
addChild(EntitySpec.create(NodeJsWebAppService.class)
.configure(NodeJsWebAppService.APP_GIT_REPOSITORY_URL, "https://github.com/grkvlt/nodejs-todo/")
.configure(NodeJsWebAppService.APP_FILE, "server.js")
.configure(NodeJsWebAppService.APP_NAME, "nodejs-todo")
.configure(NodeJsWebAppService.NODE_PACKAGE_LIST,
ImmutableList.of("express", "ejs", "jasmine-node", "underscore", "method-override", "cookie-parser", "express-session", "body-parser", "cookie-session", "redis", "redis-url", "connect"))
.configure(SoftwareProcess.SHELL_ENVIRONMENT,
ImmutableMap.<String, Object>of("REDISTOGO_URL", DependentConfiguration.formatString("redis://%s/", attributeWhenReady(redis, DockerUtils.mappedPortSensor(RedisStore.REDIS_PORT)))))
.configure(SoftwareProcess.LAUNCH_LATCH, attributeWhenReady(redis, Startable.SERVICE_UP)));
}