My app is using Yeoman, AngularJS. I'm fairly new to it and so this questions is regarding managing data. Currently I am hard coding my data into an array of JSON object in my main.js file as such
angular.module('myApp')
.controller('AdminCtrl', ['$scope', '$filter', function($scope, $filter) {
//<--ARRAY OF DATA with multiple attributes<--
$scope.campaigns = [
{ name:'', description'', etc... etc...},
{...Lots of Data...},
{...Lots of Data...},
{...Lots of Data...},
{...Lots of Data...},
];
}]);
I am already deploying the site via heroku and so I wanted to upload this data into the starter dev Heroku Postgres Database. This is my first time uploading data to the heroku database and was wondering how I would go about this process. I want to use Node.js (also new for me) and I found this article (https://devcenter.heroku.com/articles/heroku-postgresql#connecting-in-node-js) but is this all I have to do? Where and how do I transfer my current array data into Node.js and then upload it to heroku?
Edit: I followed the http://www.sitepoint.com/deploying-yeomanangular-app-heroku/, and http://www.lars-schenk.com/deploying-a-yeoman-angular-app-to-heroku/1661 articles (basically the same it seems) that @montecruiseto suggested and did a "grunt build" but the data is still lost when I refresh the page. This is my first time using Node.js but I believe these examples are deploying a static angular app without dynamic data update. What are the steps I need to take to take my current array data and utilize the "web.js" to make it persist up in the Heroku database?