Node.js on Heroku? - javascript

I wonder if all Heroku addons - that are currently working for Rails - will work for Node.js once the support is there?
And what is the ETA for the launch of Node.js support?

Node.js is now officially supported on Heroku.

Several addons currently require specific ruby gems to be installed so I think Node.js will have its own separate set of addons.
As for launch, to my knowledge there is no ETA yet.

Whether or not an addon will work with node is going to specific to the addon itself, probably whether the addon requires a Ruby lib to work.
I'm currently using Loggly, RedisToGo, Mongolab, and RabbitMQ via Addons all with node.

It is supported by CEDAR stack on heroku
All you have to do is put into .gitignore node_modules directory and create Procfile eg.
web: node web.js
This is just a command to startup your application.
Important thing is that you should layout your app as node_module i wrote a blog post about it
http://no-fucking-idea.com/blog/2012/04/23/building-node-dot-js-module-using-npm/
So you can look it up.
url explaining how to deploy is here:
https://devcenter.heroku.com/articles/nodejs
Have fun!

Related

How to find whether software is installed or not in windows/mac using javascript or nodejs

My requirement is using Javascript I need to check whether xyz.msi/xyz.pkg application is installed or not in windows & mac system.
But I could not find any solution so I am trying through NodeJS. I have the following doubts
Will NodeJS help me to achieve above requirement?
Is there any way to get list of installed application using nodeJS
or by passing particular application name can I get information about that application using NodeJS.
If anyone has ideas, Please kindly share it.
tips:
I'm not sure javascript but node.js.
when you exec your project in node.js, you've has operate permission to do anything on your platform of os.
you can use child_process of node.js to exec shell on your pro and watch stdout to check if you have installed.

Electron (Atom-Shell) Run unix command from link in page

I am trying to learn Electron (Atom-Shell) but I am finding it pretty tough to find documentation for it...
I am simply trying to figure out how to create a link with in index.html, and have it open a terminal window or run some sort of program.
I learn languages by learning specific tasks as I need them in a program, so that is why I am asking so then I can utilize the technique used in other ways in my programs.
Thank you for helping.
Well, essentially Electron is just a customised version of a Chromium browser that comes packaged with Nodejs and some really cool packages that basically allow you to run the custom browser as if it was a native platform application. Because of that creating an Electron app is very similar to creating a web-app that has a Nodejs back-end.
So to get started with a simple "Hello World!" app, you can just run the following npm...
npm install electron-prebuilt --save-dev
Once the npm is installed you'll need three files to run an Electron app.
A package.json file
A javascript file (default is main.js)
An html file (default is index.html)
See this GitHub repo for a quick copy/paste version of each and more detailed instructions: https://github.com/mafintosh/electron-prebuilt
after that you're ready to simply run your app...
$ electron .
Finally, one way to open a terminal window would be to use an onclick attribute in your html to trigger a child_process, found here, in a function.
That's it! You should be able to edit your html and javascript files as you would for any web-app, and take advantage of the added features that Electron provides.
I'd also check out these resources for more info:
A Quick Start intro to how Electron works -- https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md
The Atom discussion forum (Because Atom was built with Electron, and is made to be hackable, the community is quite active) -- https://discuss.atom.io/c/electron
A cool repo to keep up with the latest info. It includes links for apps that currently use Electron, tutorials, videos, and more --
https://github.com/sindresorhus/awesome-electron
I hope that helps!

Meteor kadira no such package

we are developing our meteor application in a windows environment using the unsupported windows version of meteor. The latest release is 0.8.3. Ok in the windows environment we used meteor add for the packages. But if i write
meteor add meteorhacks:kadira
meteor add kadira
I always get the no such package message. mrt command doesnt work. Any ideas?Thanks
I think this question is duplicated. Please refer here
meteor add meteorhacks:kadira is available only in Meteor 0.9 and above.
For Meteor below 0.9 you have to use Meteorite which is currently not supported by windows.
I'm developing an application in Meteor 0.8.3 and I have to use mrt: https://github.com/oortcloud/meteorite
The command is:mrt add kadira
I highly recommend you to upgrade as soon as possible. If you application depends on atmosphere packages, you'll have a hard time try to upgrade it later. Today most packages are obsolete because the creators don't care about it anymore.
Having in consideration that you're using an unsupported windows version: I don't really know if this is going to work. It's work great for Meteor at version 0.8.3 today.

Package node.js in Cocoa/OSX app

OK, here's what:
I don't want to write an OSX app in node.js - the app is almost complete and 100% in Objective-C/Cocoa
I don't want to bridge Objective-C and node.js
I want to be able to execute a js/node.js script, regardless of whether the user has already pre-installed the node.js binary
So, is there any known way? What would you suggest?
I found a couple resources that look as though they have had success embedding node in a Mac App. I haven't tried them yet, but they look promising.
How to add NodeJS and node_modules to a Mac App
https://ind.ie/labs/blog/gracefully-running-node-as-an-nstask-in-cocoa/
Have a look at zeit/pkg: Package your Node.js project into an executable.

Using Node during asset compilation rails on heroku

Does anybody know if this issue of old node versions regarding using https://github.com/dockyard/es6_module_transpiler-rails on Heroku has been resolved.
https://gist.github.com/bcardarella/7384208
Copying the gist:
I have been working with Peter Wagenet from Tilde on getting support
for Ember Appkit on Heroku with a Rails app. First some background:
Ember Appkit will Transpile ES6 modules for use as AMDs. To that end I
wrote the es6_module_transpiler-rails gem which uses Node and Square's
es6-module-transpiler package. That package makes use of Esprima for
the parsing. There is an issue of a reserved keyword in older
JavaScript runtimes not being quoted properly:
https://code.google.com/p/esprima/issues/detail?id=469
On our local machines everything works OK and the transpiling does not
bomb out because our versions of Node are recent. However, when we
deploy to Heroku and Rails attempts to pre-compile its assets the
version of Node that Heroku uses is out of date. Based upon some
research it appears by default Heroku is using Node v0.4.7 which is
from April 2011. It is easy enough to force Heroku to use a more up to
date version of Node:
https://devcenter.heroku.com/articles/nodejs-support#versions however
it is currently unclear if this will run side-by-side with a Rails app
for pre-compilation. Furthermore, I do not think it is reasonable to
ask Rails developers to include Node configuration code for Heroku in
the apps.
I respectfully request that the default version of Node for Rails's
asset compilation get bumped up to a more recent version.
we support integration through node by using multi buildpack and by defining a package.json in your application. Here's the PR https://github.com/heroku/heroku-buildpack-ruby/pull/245
Make sure nodejs comes first in the .buildpacks file then you can get any version of Node you want.

Categories

Resources