NodeJS Data Access Notes

Drivers for relational DB's massive-js MySQL and PostgreSQL MsNodeSQL Native. Built in C/C++ Fast Hard to compile on Windows. Easy to get working on a Mac. Get the node-sqlserver-binary which is a precomiled version of the MsNodeSQL libary when using this on Windows Edge ScriptCS and Node.js interop…

Read this article

Angular FullStack Forcing SSL

This is how to force SSL using the Angular FullStack template https://github.com/DaftMonk/generator-angular-fullstack/issues/764…

Read this article

Angular FullStack Get Current User

Middle ware to get the current user - This allows the request to still go through, but just withouth a user associated with it.…

Read this article

Grunt Task Runner

Common Issues Wiredep: Cannot read property 'main' of undefined Error Running "wiredep:target" (wiredep) task Warning: Cannot read property 'main' of undefined Use --force to continue. Solution Check your bower.json file. Remove any lines from there of packages that are not installed.…

Read this article

Curl

get headers using curl curl -I http://somesite.com…

Read this article

Wget Snippets

Get past 401 unauthorized when using wget This snippet, gets past most defense when a 401 unauthorized is returned Will only scrape all of the images from a website. Changes the user agent to look like a real web browser Adds a cookie wget -r -P storeInThisFolder -A jpeg,jpg,…

Read this article

AWS CLI Shortcuts

List Metrics aws cloudwatch list-metrics --namespace "Web" Find EC2 Instance based on internal IP Address aws ec2 describe-instances --filters "Name=private-ip-address,Values=172.16.3.57" AWS CLI http://docs.aws.amazon.com/cli/latest/reference…

Read this article

Useful NodeJS Modules

Rest Client Node Package Github repo npm install node-rest-client --save Json File Node Package npm install jsonfile --save Underscore underscore npm install underscore --save Geolib Feature rich library for calculating the distance between 2 objects among many other things. Geolib github page Geolib node package npm install geolib --save Geopoint…

Read this article

Angular FullStack Commands

Comlete Commands See the Angular fullstack github page Server Side Scaffolding API EndPoints Generates everything you need for a new API endpoint yo angular-fullstack:endpoint attraction will generate the boiler plate code: server/api/attraction/index.js server/api/attraction/message.spec.js server/api/attraction/message.controller.js server/…

Read this article

Deploying Angular Fullstack to Heroku

Download Heroku ToolBelt Heroku Toolbelt Download Authenticate with Heroku heroku auth:login Deploy yo angular-fullstack:heroku Add MongoDB Add MongoDB to Heroku only if you are using it Verify your account at: https://heroku.com/verify cd dist heroku addons:create mongolab Configuring Domains You will need to add your…

Read this article