Skip to content

Instantly share code, notes, and snippets.

View dev0T's full-sized avatar
🥔
potato

T dev0T

🥔
potato
  • Vancouver
  • 05:24 (UTC -07:00)
  • LinkedIn in/dev-t
View GitHub Profile
@dev0T
dev0T / setup_cypress_wsl2.md
Created May 10, 2023 23:04 — forked from pjobson/setup_cypress_wsl2.md
Setting Up Cypress on Ubuntu WSL2
@dev0T
dev0T / book.js
Last active February 8, 2023 19:32
MongoDB + express.js + Mongoose - Aggregate pipeline instead of populate
const Author = require('../models/author')
const Book = require('../models/book')
//...
const getAll = async ({ author, genre }) => {
let bookAggregate = Book.aggregate()
if (genre) {
bookAggregate = bookAggregate.match({ genres: genre })
}