Skip to content

Instantly share code, notes, and snippets.

View jskod's full-sized avatar
🎯
Focusing

Tauqeer Awan jskod

🎯
Focusing
View GitHub Profile
@bahmutov
bahmutov / Docker shell commands.sh
Last active February 9, 2024 07:55
A personal cheat sheet for running local Node project in a Docker container
# See list of docker virtual machines on the local box
$ docker-machine ls
NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1
# Note the host URL 192.168.99.100 - it will be used later!
# Build an image from current folder under given image name
$ docker build -t gleb/demo-app .
@alancasagrande
alancasagrande / multitenant_server_multi_db.js
Last active May 7, 2021 12:04
Multi-tenant app example with multiple databases. It will create 40 databases, use this gist to the delete them afterwards: https://gist.github.com/alancasagrande/4aa8b4a45ff7c8829ff5
var express = require('express');
var mongoose = require('mongoose');
var dbs = {};
for (var i = 0; i < 40; i++) {
dbs['t' + i] = mongoose.createConnection('mongodb://localhost/t' + i + '__multitenant', { server: { poolSize: 5 } });
}
var app = express();