mongodb_url in config

This commit is contained in:
qwertyforce 2020-09-21 19:58:33 +03:00
parent 978685ebd9
commit 5fb27bb136
3 changed files with 5 additions and 3 deletions

View File

@ -9,5 +9,6 @@ export default {
GITHUB_CLIENT_SECRET: "a2b8462d6cefb17339f4b730578db280b65e84ad",
GITHUB_REDIRECT_URI: "http://localhost/auth/github/callback",
gmail_user:"auth.test.reg.email@gmail.com",
gmail_password:"sbuLBh9rAV8XD2"
gmail_password:"sbuLBh9rAV8XD2",
mongodb_url:"mongodb://localhost/"
}

View File

@ -1,6 +1,7 @@
import {MongoClient} from 'mongodb'
import crypto from "crypto"
const url = 'mongodb://localhost/';
import config from '../../config/config'
const url = config.mongodb_url;
const options = {
useNewUrlParser: true,
useUnifiedTopology: true

View File

@ -75,7 +75,7 @@ next_app.prepare().then(() => {
sameSite: 'lax'
},
store: new MongoStore({
url: 'mongodb://localhost/Scenery',
url: config.mongodb_url+'Scenery',
ttl: 14 * 24 * 60 * 60
}) // = 14 days. Default
}))