Skip to content

Commit

Permalink
Merge pull request electrode-io#8 from xchen11/develop
Browse files Browse the repository at this point in the history
add service registry provider
  • Loading branch information
jchip committed Dec 19, 2015
2 parents 410902c + 60587a9 commit db74175
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
12 changes: 11 additions & 1 deletion lib/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ module.exports = {
server: {
app: {
electrode: true,
config: {}
config: {
services: {
env: "",
providers: {
registry: {
module: "@walmart/service-registry-client",
autoInit: true
}
}
}
}
}
},
connections: {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@walmart/electrode-server",
"version": "1.0.1",
"version": "1.0.2",
"description": "A configurable Hapi web server",
"main": "lib/index.js",
"scripts": {
Expand Down Expand Up @@ -45,6 +45,7 @@
},
"dependencies": {
"@walmart/electrode-service-initializer": "^1.0.0",
"@walmart/service-registry-client": "^1.0.0",
"bluebird": "^3.0.6",
"chalk": "^1.1.1",
"crumb": "^5.0.0",
Expand Down
5 changes: 5 additions & 0 deletions test/server-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ describe("electrode-server", function () {
});

it("should start up with a good @empty_config", function (done) {
const verifyServices = (server) => {
chai.assert(server.app.services.registry, "registry service is not present in server.app");
return server;
};
electrodeServer("./test/data/empty-config.js")
.then(verifyServices)
.then(stopServer)
.then(() => done())
.catch(done);
Expand Down

0 comments on commit db74175

Please sign in to comment.