I finally upgraded my Ubuntu 10.04 LTS Linode to Ubuntu 14.04 LTS. Had a heck of a problem with what should have been a very simple upgrade.
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.
Well, I'm no expert but here's a tip that might save you some time. I have a Drupal databae outputting valid GeoJSON data. Our data looks like this:
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.
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'
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
Here's how I lost 3 hours. In using a comination of these modules with the Drupal Foundation theme. I wanted a small search button aligned right in the right sidebar. See http://mobilemaps-dev-proxy.ucsc.edu.
- search api
- search api autocomplete
- search api live results
- Foundation 4 theme
One thing that has been frustrating me in learning the MEAN stack has been how to extend the basic Article example (or a CRUD created module) beyond the basic data model. While you're trying to learn AngularJS and Mongoose/MongoDB interactions, you can find lots of literature on modelling, but little on how to modify your core CRUD views, model and controllers to work together. I'm sure that there may/are better and more elegant ways to accomplish this.
// sample file
// notes - coordinates needs to be bracketed to indicate an array otherwise we get string
// created - use a yyyy-mm-dd for basic entry
"name": "Cowell College - Apartment 2",