Skip to content

Commit

Permalink
mongo Online
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimfrolov committed Nov 9, 2019
1 parent 3105755 commit 3a71ced
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const express = require('express');
const session = require('express-session');
const FileStore = require('session-file-store')(session);
const passport = require('passport');
require("dotenv").config();

let MongoKey = process.env.MONGO_ONLINE;

const path = require('path');
const morgan = require('morgan');
Expand Down Expand Up @@ -55,7 +58,7 @@ app.use(express.static(path.join(__dirname, 'public')));

// Подключаем mongoose.
const mongoose = require("mongoose");
mongoose.connect("mongodb://localhost:27017/final", {
mongoose.connect(`${MongoKey}`, {
useNewUrlParser: true,
useUnifiedTopology: true
});
Expand Down
92 changes: 92 additions & 0 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"bcrypt": "^3.0.6",
"cookie-parser": "^1.4.4",
"cors": "^2.8.5",
"db": "^1.1.1",
"debug": "~2.6.9",
"dotenv": "^8.2.0",
"express": "~4.16.1",
Expand Down

0 comments on commit 3a71ced

Please sign in to comment.