MeanJS

By peterm, 25 August, 2015

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.

npm cache clean -f

Tags

By peterm, 24 May, 2015

As I continue to study the MEAN.JS framework, I wanted to develop an app that would help cement what I've learned, illustrate some of the points I got hung up on and try to define problems well enough that I can try to get some more help where needed.

Tags

By peterm, 27 April, 2015

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.

app.route('/api/articles')

.get(articles.list);

By peterm, 23 April, 2015

Created a norcal.cities.geojson file via geojson.io site.

 

In this tutorial we will load a small data set into MongoDB and build a simple map that adds a marker to a map. There is some preparation for this tutorial, so you will need the following:

- a working MeanJS environment

- created an Article in your working environment

- be prepared to do some find / replace in the GeoJSON data file attached to this tutorial

- be able to run commands from the terminal to load data into MongoDB via mongoimport and install angular-leaflet-directive

Tags

By peterm, 23 April, 2015

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.

Tags

By peterm, 9 February, 2015

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.

Tags

By peterm, 23 January, 2015

Over the past week, in between meetings, I've gotten some additional functionality added. I've been able to enter a number of Leaflet nodes (records) and then display markers on the "list" view. I've created a link in the popup that then takes us to the detail record. I've also been taking Dan Whalin's Udemy course. His site has a 50% off coupon code.

By peterm, 12 January, 2015

I've been looking at how to refactor our campus maps app from being Drupal based to sometihng that is based on a RESTful API so that data can be easily shared with other apps. Drupal has gotten us a long way, but the map stack of modules we're using has some limitations. I need to pull some custom map work stored at Mapbox.com giving us deeper zooms and styling rules we've decided upon.

The MEAN stack offers one refactoring option. So, I spent Christmas vacation doing some reading, configuring and thinking about how the MEAN stack might work for our needs.