Skip to content

Commit 4628a79

Browse files
committed
Now returns service hostname and port
1 parent 3883996 commit 4628a79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ router.post('/createDB', function (req,res) {
3030
}
3131

3232
users.save(username, password, true);
33+
let hostname = req.hostname
34+
let port = req.port
35+
3336
// Grants user access only to newly created database
3437
users.grantDatabase(username, dbName, 'rw');
35-
res.send({dbName, username, password});
38+
res.send({dbName, username, password, hostname, port});
3639
}
3740
})
3841
.body(joi.object().required(), 'Creates a new database, optionally provide dbName, username, or password ')

0 commit comments

Comments
 (0)