fix/.env example + delete .vscode folder
This commit is contained in:
3 files changed
+10
-11
No files matched your search
+6
-3
@@ -1,4 +1,7 @@
|
|||||||
mongoURI='mongodb://localhost:27017/'
|
MONGO_URI='mongodb://localhost:27017/'
|
||||||
database='nameOfDatabase'
|
DATABASE='nameOfDatabase'
|
||||||
PORT=8000
|
PORT=8000
|
||||||
secret='123456789'
|
SECRET='123456789'
|
||||||
|
GEOLOCATION_API='api_key'
|
||||||
|
EMAIL_USER=mail@example.com
|
||||||
|
EMAIL_PASS='password'
|
||||||
Vendored
-4
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"editor.fontFamily": "Monocraft",
|
|
||||||
"editor.fontLigatures": true
|
|
||||||
}
|
|
||||||
@@ -9,9 +9,9 @@ require('dotenv').config();
|
|||||||
const app = express();
|
const app = express();
|
||||||
const port = process.env.PORT || 3000;
|
const port = process.env.PORT || 3000;
|
||||||
|
|
||||||
const mongoURI = process.env.mongoURI;
|
const mongoURI = process.env.MONGO_URI;
|
||||||
const database = process.env.database; // Database name
|
const database = process.env.DATABASE; // Database name
|
||||||
const secret = process.env.secret || "123-secret-xyz";
|
const secret = process.env.SECRET || "123-secret-xyz";
|
||||||
|
|
||||||
/*** Sessions ***/
|
/*** Sessions ***/
|
||||||
app.use(session({
|
app.use(session({
|
||||||
@@ -36,7 +36,7 @@ let users;
|
|||||||
let assets;
|
let assets;
|
||||||
let plans;
|
let plans;
|
||||||
async function initDatabase() {
|
async function initDatabase() {
|
||||||
const db = await connectMongo(mongoURI, database);
|
const db = connectMongo(mongoURI, database);
|
||||||
|
|
||||||
// For any collection, init here
|
// For any collection, init here
|
||||||
users = await getCollection(db, "users");
|
users = await getCollection(db, "users");
|
||||||
|
|||||||
Reference in new issue
Block a user