Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions env.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@
"VSAC_API_KEY": {
"type": "string",
"default": "changeMe"
},
"SMART_ENDPOINT": {
"type": "string",
"default" : "http://localhost:3005/launch"
}
}
5 changes: 2 additions & 3 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ const whitelist_env =
// If it's length is 1, set it to a string, so * works
// If there are multiple, keep them as an array
const whitelist = whitelist_env && whitelist_env.length === 1 ? whitelist_env[0] : whitelist_env;

export default {
server: {
port: 8090,
port: env.PORT || env.SERVER_PORT,
discoveryEndpoint: '/cds-services'
},
smart: {
endpoint: 'http://localhost:3005/launch'
endpoint: env.SMART_ENDPOINT
},
logging: {
level: 'info'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/MongoDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class MongoDatabase extends Database {
new Promise(resolve => {
// Connect to mongo
console.log('MongoDatabase connect: ' + this.location);
const dbString = `${this.location}${this.db_name}`;
const dbString = `${this.location}/${this.db_name}`;
this.client = new mongoose.mongo.MongoClient(dbString);
this.database = this.client.db(this.db_name);
return resolve(mongoose.connect(dbString));
Expand Down