Skip to content

codepope/shellfaker

Repository files navigation

shellfaker and nodefaker

These are examples which got with the blog posting "Boosting JavaScript: From MongoDB's shell to Node.js". Each example is a different iteration of the solution outlined in the article.

  • shellfaker.js is the starting point, a MongoDB mongo shell script with generates up fake names and inserts them into a collection.

  • nodefaker.basic.js is the first iteration, wrapping the shell script with sufficient Node.js calls so that it can run from the command line in a similar way.

  • nodefaker.await.js uses the await and async features to replicate the shell's timing behavior.

  • nodefaker.promise.js gets smarter about promises and boosts the scripts performance.

  • nodefaker.bulk.js skips the whole thing and goes for really fast bulk inserting as a counter example.

About

A MongoDB shell script and its port to Node.js as part of a blog

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy