conradev/application_nodejs — pull request #9 by rizzatti (2014-04-25 04:14:08+00:00)
Title: Updates and minor improvements

First of all, thanks for making this available.
I was having some trouble using this cookbook with the release of Ubuntu 14.04, so I made some changes.

This works fine with both edge/master versions of application and nodejs cookbooks.

I'm not quite sure how support for node is on other distros, but the latest Ubuntu releases have kept pretty up2date, and now the nodejs cookbook has changed their policy to use the packages from the ppa.

The only reason the forced attribute now has more to do with the npm install than with the presence of node itself. I'd argue that maybe a better solution to including the nodejs::npm recipe would be to check for the executable on the system, because that recipe is a bit nuts :) One can only avoid this by making sure both ```node['nodejs']['dir']``` and ```node['nodejs']['npm']``` version are set right.

Anyway, with the changes, we can now have recipes that look like, for people like me, who have multiple daemons in the same repo:

```ruby
application 'ologger' do
path node['infosan']['ologger']['dir']
owner node['infosan']['user']
group node['infosan']['user']
repository node['infosan']['ologger']['repo']
deploy_key File.join(node['infosan']['home'], '.ssh', 'bitbucket')
action :deploy

nodejs do
entry_point 'bin/collectord'
service_name 'collector'
end

nodejs do
entry_point 'bin/commandsd'
service_name 'commands'
end
end
```