Fetching venues from Foursquare using Go

Third party packages used:

Nodes Forever Package Doesn’t Mean Forever!

I run most of my node apps on a droplet with DigitalOcean. Recently there was an issue and the droplet had to be restarted by them, but my app didn’t restart. This was a big issue for me and my client. I use Forever to run the app, but this only works if the app crashes and not when the server is rebooted.

The solution to this is to use an Upstart script. The one below is an example of one I use, as you can see its pretty small. The scripts can get rather complex and it all depends on your needs.

The scripts need to live in /etc/init/ directory and with a .conf file extension.

The script can be started by running sudo service appname start. 

Access and Update Model Outside Angular

In a recent project I had a form within an Iframe that needed to talk to the parent frame via postMessage. The parent frame was an angular application and I had to show and hide some content. I was able to access the scope outside angular and update via the angular.element() method (This is using version 1.4.2).

 

© 2016 Aldo Lugo

Theme by Anders NorenUp ↑