-
How to specify `–authenticationDatabase` in mongoose? · Issue #3905 · Automattic/mongoose · GitHub
“Easiest way is to specify authSource in the uri
const uri = ‘mongodb://monguser:mongpass@192.168.2.2:27017/ps?authSource=admin’;”
-
“use admin
db.createUser(
{
user: “myUserAdmin”,
pwd: “abc123”,
roles: [ { role: “userAdminAnyDatabase”, db: “admin” }, “readWriteAnyDatabase” ]
}
)” -
Installing Express/Nginx app with SSL using Certbot on Ubuntu 18.04 | Codementor
“sudo npm install -g pm2
sudo pm2 startup
sudo pm2 start index.js
sudo pm2 save”-
server { listen 80; server_name yourdomain.com www.yourdomain.com; location / { proxy_pass http://localhost:3001; # Change the port if needed proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection ‘upgrade’; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
-
sudo ln -s /etc/nginx/sites-available/yourdomain.com.conf /etc/nginx/sites-enabled/
-
sudo add-apt-repository ppa:certbot/certbot sudo apt update sudo apt install python-certbot-nginx
-
sudo certbot –nginx
-
sudo service nginx restart
-
-
How can I get a Let’s Encrypt certificate for a non-public facing server? – Server Fault
“Basically, you run this command and follow the directions:
certbot -d site.your.dom.ain –manual –preferred-challenges dns certonly”
-
node.js – mongoose query same field with different values – Stack Overflow
“mongoose.find({title: {$in: [‘some title’, ‘some other title’]}})”