From c609db09c1263fe1b5f5c09387454bf687ba87ee Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Wed, 18 Mar 2020 11:15:10 -0500 Subject: [PATCH 1/2] fix(content): feature shinies --- .../script/content/shop-featuredItems.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/website/common/script/content/shop-featuredItems.js b/website/common/script/content/shop-featuredItems.js index 564365cea6..0f6fa8fd8f 100644 --- a/website/common/script/content/shop-featuredItems.js +++ b/website/common/script/content/shop-featuredItems.js @@ -5,6 +5,26 @@ import moment from 'moment'; // path: 'premiumHatchingPotions.Rainbow', const featuredItems = { market () { + if (moment().isBefore('2020-05-02')) { + return [ + { + type: 'armoire', + path: 'armoire', + }, + { + type: 'premiumHatchingPotion', + path: 'premiumHatchingPotions.BirchBark', + }, + { + type: 'premiumHatchingPotion', + path: 'premiumHatchingPotions.Shimmer', + }, + { + type: 'premiumHatchingPotion', + path: 'premiumHatchingPotions.Celestial', + }, + ]; + } return [ { type: 'armoire', From d72493364057c00bce2fe82afc5d002a51f2fbc3 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Wed, 18 Mar 2020 19:17:08 +0100 Subject: [PATCH 2/2] update mongoose options --- config.json.example | 4 ++-- website/server/libs/setupMongoose.js | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config.json.example b/config.json.example index 32ba8cf1a1..306e1bb24e 100644 --- a/config.json.example +++ b/config.json.example @@ -32,7 +32,7 @@ "LOGGLY_SUBDOMAIN": "example-subdomain", "LOGGLY_TOKEN": "example-token", "MAINTENANCE_MODE": "false", - "NODE_DB_URI": "mongodb://localhost/habitrpg", + "NODE_DB_URI": "mongodb://localhost:27017/habitrpg", "MONGODB_POOL_SIZE": "10", "NODE_ENV": "development", "PATH": "bin:node_modules/.bin:/usr/local/bin:/usr/bin:/bin", @@ -70,7 +70,7 @@ "SLACK_URL": "https://hooks.slack.com/services/some-url", "STRIPE_API_KEY": "aaaabbbbccccddddeeeeffff00001111", "STRIPE_PUB_KEY": "22223333444455556666777788889999", - "TEST_DB_URI": "mongodb://localhost/habitrpg_test", + "TEST_DB_URI": "mongodb://localhost:27017/habitrpg_test", "TRANSIFEX_SLACK_CHANNEL": "transifex", "WEB_CONCURRENCY": 1, "SKIP_SSL_CHECK_KEY": "key", diff --git a/website/server/libs/setupMongoose.js b/website/server/libs/setupMongoose.js index db7610426e..91eae637f9 100644 --- a/website/server/libs/setupMongoose.js +++ b/website/server/libs/setupMongoose.js @@ -8,9 +8,15 @@ const POOL_SIZE = nconf.get('MONGODB_POOL_SIZE'); // Do not connect to MongoDB when in maintenance mode if (MAINTENANCE_MODE !== 'true') { - const mongooseOptions = !IS_PROD ? {} : { + const commonOptions = { + useNewUrlParser: true, + useUnifiedTopology: true, + }; + + const mongooseOptions = !IS_PROD ? commonOptions : { keepAlive: 120, connectTimeoutMS: 30000, + ...commonOptions, }; if (POOL_SIZE) mongooseOptions.poolSize = Number(POOL_SIZE);