Skip to content

Commit

Permalink
Merge pull request #228 from Arquisoft/login_no_funca
Browse files Browse the repository at this point in the history
Security fix
  • Loading branch information
ritacatuxo authored Apr 27, 2024
2 parents 4ab2545 + 0ffe88c commit 72b3533
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test-results/
# Mac bundle stuff
*.dmg
*.app
.env

# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
Expand Down
5 changes: 3 additions & 2 deletions users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
const express = require('express');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
const dotenv = require('dotenv');

dotenv.config();

// app and port definition
const app = express();
const port = process.env.PORT || 8003;


// Connect to MongoDB
const mongoUri = process.env.MONGODB_URI || 'mongodb+srv://prueba:[email protected]/?retryWrites=true&w=majority&appName=Cluster0';
const mongoUri = process.env.MONGODB_URI;

mongoose.connect(mongoUri).then(
console.log('Succesfully connected to MongoDB')
Expand Down
12 changes: 12 additions & 0 deletions users/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 users/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"bcrypt": "^5.1.1",
"body-parser": "^1.20.2",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.18.2",
"jsonwebtoken": "^9.0.2",
"mongodb": "^6.3.0",
Expand Down

0 comments on commit 72b3533

Please sign in to comment.