Paige Niedringhaus writes a nice blog post called Password Reset Emails In Your React App Made Easy with Nodemailer, where she outlines how to use Nodemailer + ReactJS + Node.js + MySQL + Sequelize to build a simple password reset flow. Everyone reading these words has doubtless gone through the familiar password reset song and dance. Enter your email into a form field, receive an email with a link, click the link, reset your password, voilà!
A run down on the apps I use regularly and why. Caution, Mac specific drivel ahead. Vim Do I even need to explain? It’s pretty common place for proud Vim users to show off their .vimrc, but I’ve come to find copy/paste from someone else’s .vimrc is not really a good idea. A developer’s .vimrc is a personal matter, crafted over time with love and affection, it suits them and their needs.
A coworker asked me the other day. Why Vim, what do you like so much about it? I would dare say everyone who encounters Vim has a similar story. Many years ago, while on a linux machine I first encounted Vim. It was a simple way to edit text on the server. It didn’t make sense, but it worked. That was the extent of engagement with Vim for about 10 years, just being able to do simple editing of text.
Maybe you’re familiar with the LAMP stack? Linux, Apache, MySql, PHP. That’s been a pretty common way to serve websites for many years (circa 1998?). But things have changed, technologies have changed, and it’s not 1998 anymore. IE6 is dead, nested tables are dead, and the LAMP stack is the Old and Busted. The New Hotness is the MEAN stack, MongoDB, ExpressJS, AngularJS, and NodeJS. This new stack of technologies is what many new web apps are using these days.
Setting up Jenkins for Node.js + Mocha testing and such Install this stuff Node.js via Nave git clone https://github.com/isaacs/nave.git* ./bin/nave.sh usemain v.0.8.9 Mocha npm install -g mocha ChaiJS npm install -g chai xunit-file (Mocha custom report for Jenkins) npm install -g xunit-file Jshint npm install -g jshint Nock npm install -g nock Supertest npm install -g supertest Testacular npm install -g testacular PhantomJS npm install -g phantomjs Here is a handy script that will install v0.
Rollcall! AngularJS in your code ✓ Jenkins ✓ Node.js is installed on the Jenkins server? ✓ Testacular is installed on the Jenkins server ✓* PhantomJS is installed on the Jenkins server ✓ If that’s what you’re using, this is how I set up testing on the Jenkins server. Create a new job in Jenkins Pull from Git (or whatever), Trigger how you want too. That’s not germane to this article.
My setup is easy. Node.js, ExpressJS, MongooseJS. The Problem I was getting a list of objects from the MongoDB. Like this // Find all items where owner in following array Thing.find() .where('owner').in(following) .populate('owner') .populate('comments.userId') .sort('-updatedOn') .limit(20) .exec(callback); In the callback I was assigning the results to res.locals.things for use in another middleware function. In another middleware function I tried this // Extend thing[i] with a new property called newProperty for var i=0; i < res.
If you publish content on the web, get ready, a shift started a while back, but now gaining momentum. I first encountered Markdown a few years ago and had a fancy for it, but never took the time to learn it. I didn’t really have a use for it. Now that I’ve had to use it on StackOverflow, GitHub, and other great sites, I’m convinced it’s time to learn it.