Skip to content

Instantly share code, notes, and snippets.

View mariohmol's full-sized avatar
:octocat:
lets make opensource!

Mario Mol mariohmol

:octocat:
lets make opensource!
View GitHub Profile
@mariohmol
mariohmol / mario.js
Last active June 29, 2018 17:45
example showing created subdoc ids
#!/usr/bin/env node
'use strict';
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
const conn = mongoose.connection;
const Schema = mongoose.Schema;
const schema = new Schema({
arr: [{ type: mongoose.Schema.Types.Mixed }]