node js on amahi

digitalbanana
Posts: 3
Joined: Fri Dec 28, 2012 1:21 pm

node js on amahi

Postby digitalbanana » Fri Dec 28, 2012 1:26 pm

Hey Peeps,

I'm new(ish) to the linux world being a mostly WinKiddie but I recently installed Amahi as a replacement for my WHS installation that crashed. My question is is it possible to install node js to run on my Amahi box at all? ideally it will run happily alongside Apache? Ideally using port 80 through a virtual directory...? Is this possible at all does anyoneknow? Can anyone point me where to learn more? My Amahi box is a headless install just to make things fruity....

Many thanks in advance for any help you might be able to offer

Dave

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: node js on amahi

Postby cpg » Sat Dec 29, 2012 2:25 am

Amahi works nicely as a development box :)

The way to do this is:
  • run node accepting connections on some other port (typically a high port), say, 8888 or something
  • set up a virtualhost that proxies port 80 and that port, say 8888
You can use the webapps feature in Amahi to get a basic virtualhost setup. But you need to add something like this inside the virtualhost configuration to proxy it properly

Code: Select all

ProxyPass / http://hda:8888/ ProxyPassReverse / http://hda:8888/
we hope to one day have an easier setup for node, as it's very cool!
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

ddogg777
Posts: 19
Joined: Tue Nov 24, 2015 12:24 pm

Re: node js on amahi

Postby ddogg777 » Sun Jun 05, 2016 10:41 am

For a fedora 23 newbie as myself, how does one install node.js into Amahi? I'm looking to control Sonos with my echo and node.is is an important step...

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: node js on amahi

Postby cpg » Sun Jun 05, 2016 11:52 am

There are two main ways. The packages in the repos (probably old) and manually (get the latest.)

You can see all node.js packages with

Code: Select all

rpm -qa | grep nodejs-
You can probably see that version 0.10.42 is what's there. I see the main download page for node saying
Current version: v4.4.5 (includes npm 2.15.5)
So I'm not sure if it's different package versions or way out of date.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

Who is online

Users browsing this forum: No registered users and 22 guests