What's New

Doing a lot of work and studying in AngularJS and the MEANJS stack. 

Drop me a note if you're looking for something you can't find.

Peter

Setting up a Docker container to move between hosts

Upon running this command on my MacBook Air:
docker run -i -t --name mymeanjs --link mymongodb:db_1 -p 80:3000 maccam912/meanjs:latest bash
 
We have a running container that needs to have the npm and bower installs completed before we can do much with it. We'll then clone meanjs from github and build it. This image It will also need Ruby and the gem sass installed.

Docker Containers, MEANJS, AWS

I recently had come across this article, Running a MEAN web application in Docker containers on AWS. I'm researching containers for development work that can start in one place and then migrate into production as a docker file. So I spent an hour getting this up and running. In addition to the steps in the article, I found a few extra steps might make things work better.

1. Update Node. The maccam912 VM has an older version of node. It's an easy fix.

When Did I Become a Car Guy?

Having driven a 1966 VW bug, 1969 van, 1972 bug, dasher, 72 van, in my early years, then Lynda and I drove the van and Penelope till we got Goldie.  Then Goldie died and we got snowball. Later we bought shadow our most expensive car to date.  Shadow and Goldie served us for years till we got hit heading to La Verne. That lead us to Lexie. Lexie served is well until a furlough Friday when her transmission failed.  

Old House

Going through these hundreds of snapshots, I'm reminded about some of our design principlles in going from the old house to new house. No 70's wallpaper, no vinyl floor patterns, easy cat cleanup, no electric range, no brown tile, no clutter, no slipping on bricks, no dark woods, no carpet, filtered air, filtered water, better and more lighting. 

Even the cats got a new wall library out of the deal.

Fireplace Insert

After we moved the propane tank, we knew we wante to stop using the wood burning stove and the old fireplace was never utilized. So, we did a fireplace insert with gas and we've never regretted it. I've updated the thermostat to work with our home automation tools and we can heat the front room in 10-15 mins.  We used Woodstove and Sun and we'll use them again for the firepit supplies when that project gets scoped.

MeanJS - Expose data as JSON via API

One of my objectives with migrating data out of Drupal and into a MEAN stack app is for easier management of downstream requests for JSON data. We want to take advantage of the built in functionality of the MeanJS stack, and here's a simple exaple.

In this use case we wish to expose articles to some other app who will make a HTTP GET request for all the articles or just one.

In app/controllers/articles.server.routes.js, we need to add entries for the two functions we'll allow via GET.

MeanIO and MeanJS - My Notes

I took some time to try MeanIO over the past few days. While I ended up coming back to MeanJS, I drew some conclusions that might be helpful.

Here's the use case. I wanted to take a GeoJSON file, load it into a boilerplate MEAN stack, generate CRUD files and get a basic app tested. Ideally, I'd want to tweak the layouts, menus, and boilerplate HTML as well as use bower to add js libs that add functionality.

Importing GeoJSON data into MongoDB

Update 5/1/15 - On a different instance of Mongo, I had run the command noted below and got errors. However, this worked:

mongoimport --db mean-dev -c points --file "points.geojson" --jsonArray

 

Let me save you the hours lost in trying to figure out getting GeoJSON features into individual documents in a collection versus one document with nested features.

MongoDB 3.0.2. Valid GeoJSON file full of 809 features.

Using this code:

mongoimport --db test --type json --file ./'mobilemaps.geojson' 

Travel in 2014

Before I forget too much of 2014, I thought I'd write down some of the cool travel we did last year.

We started with a trip to Miami and Key West in late December through early January. We hung out at the Fontainbleu and the Southernmost House. Warm, good food, lots of exercise.

In late March through early April, we went to London for 10 days. Lnda's had a Courseara conference. I walked around the city listening to Elvis Costello, The Clash, Cream, Jeff Beck and others, seeing the sights and acting as support for Lynda and Lauren Butler