Skip to content

Instantly share code, notes, and snippets.

View yeomann's full-sized avatar
Hard work yields success

Danish yeomann

Hard work yields success
View GitHub Profile
const { once, EventEmitter } = require('events');
const myEmitter = new EventEmitter();
let isJobCurrentlyRunning = false;
async function doAsyncJobsOneByOne(id) {
if (!isJobCurrentlyRunning) {
doJob(id);
} else {
await once(myEmitter, 'jobdone');
@yeomann
yeomann / docker-compose.yml
Created March 17, 2021 11:01 — forked from linuxsimba/docker-compose.yml
docker-compose for MongoDB and Mongoose UI
version: '2'
networks:
mongodb_net:
driver: bridge
ipam:
driver: default
config:
# Change this subnet range if it conflicts with your personal/work network
- subnet: 192.168.213.0/24