mirror of
https://github.com/qwertyforce/scenery.git
synced 2025-05-04 14:44:59 +00:00
mongodb_url in config
This commit is contained in:
parent
978685ebd9
commit
5fb27bb136
@ -9,5 +9,6 @@ export default {
|
|||||||
GITHUB_CLIENT_SECRET: "a2b8462d6cefb17339f4b730578db280b65e84ad",
|
GITHUB_CLIENT_SECRET: "a2b8462d6cefb17339f4b730578db280b65e84ad",
|
||||||
GITHUB_REDIRECT_URI: "http://localhost/auth/github/callback",
|
GITHUB_REDIRECT_URI: "http://localhost/auth/github/callback",
|
||||||
gmail_user:"auth.test.reg.email@gmail.com",
|
gmail_user:"auth.test.reg.email@gmail.com",
|
||||||
gmail_password:"sbuLBh9rAV8XD2"
|
gmail_password:"sbuLBh9rAV8XD2",
|
||||||
|
mongodb_url:"mongodb://localhost/"
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
import {MongoClient} from 'mongodb'
|
import {MongoClient} from 'mongodb'
|
||||||
import crypto from "crypto"
|
import crypto from "crypto"
|
||||||
const url = 'mongodb://localhost/';
|
import config from '../../config/config'
|
||||||
|
const url = config.mongodb_url;
|
||||||
const options = {
|
const options = {
|
||||||
useNewUrlParser: true,
|
useNewUrlParser: true,
|
||||||
useUnifiedTopology: true
|
useUnifiedTopology: true
|
||||||
|
@ -75,7 +75,7 @@ next_app.prepare().then(() => {
|
|||||||
sameSite: 'lax'
|
sameSite: 'lax'
|
||||||
},
|
},
|
||||||
store: new MongoStore({
|
store: new MongoStore({
|
||||||
url: 'mongodb://localhost/Scenery',
|
url: config.mongodb_url+'Scenery',
|
||||||
ttl: 14 * 24 * 60 * 60
|
ttl: 14 * 24 * 60 * 60
|
||||||
}) // = 14 days. Default
|
}) // = 14 days. Default
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user