NodeJS

Total 39 Posts

Using an ORM with NodeJS

I've written a lot about building REST API's and a few of my favorite include Rails-only API, ExpressJS, Amazon Lambda, and SailsJS. This article is going to focus on something slightly different –but still interconnected, Object Relational Models. Although it's good practice to learn how to write SQL statements, at

NodeJS: How to fix localhost Error: listen EADDRINUSE

If you're using NodeJS, sometimes you'll get an error like this: Error: listen EADDRINUSE :::5000 at Object.exports._errnoException at exports._exceptionWithHostPort at Server.setupListenHandle [as _listen2] at listenInCluster at Server.listen at Function.app.listen What this error means is that you're trying to bind the app but the

Create fake test data using Node

I'm working on a tool that enables marketers to upload a CSV file full of mobile numbers and send auto-generated surveys through Twilio. Before working on a CSV file uploader, I needed test data. I'm using Faker to create fake data, and CSV stringify to create a CSV file. Once

NodeJS: Create a Base64 image from a PNG or JPG

There are many good reasons for converting images into Base64 including: Storing an image into a NoSQL database directly. Serving an image to a client browser through an API. Sending an image to AWS Rekognition through a POST request. Simple Example var fs = require('fs') function base64_encode(file) { // read

AWS: Managing AWS Command Line with Jake Tasks

The AWS Command Line is awesome. The commands are descriptive, well organized and oftentimes easier to use than any of the dashboard consoles. If you're looking or a simple NodeJS tool to help you to script and automate commands, try JakeJS. JakeJS is a task management tool similar to Grunt

AWS: Lambda development on OS X

Through AWS Lambda, AWS is completely changing the entire web industry, again. If you're not familiar with Lambda, it's a new AWS compute service that manages the AWS resources for us. Said differently, it allows developers to write their applications without having to manage servers. It promises scalable, serverless, event-based

Simple Sendgrid Example using Node

Here is a very simple example of how to create a simple Sendgrid app using NodeJS. Change directory into your node app. cd /name/of/node/app Install Sendgrid using Node Package Manager. npm i sendgrid Use your Sendgrid username and password to send an email. var sendgrid = require('sendgrid')