Skip to content

Commit

Permalink
using environment variable to connect
Browse files Browse the repository at this point in the history
  • Loading branch information
fichimura committed Mar 27, 2024
1 parent ff88269 commit f8c7389
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ const userRoutes = require('./routes/userRoutes');
const mongoSanitize = require('express-mongo-sanitize');
const helmet = require('helmet');

// 'mongodb://127.0.0.1:27017/meerkat-app'
const mongoUrl = process.env.MONGO_ATLAS;

// mongoose.connect(process.env.MONGO_ATLAS);
mongoose.connect(mongoUrl);

const mongoUrl = 'mongodb://127.0.0.1:27017/meerkat-app';

mongoose.connect(mongoUrl);

Expand Down

0 comments on commit f8c7389

Please sign in to comment.