i need help with node.js

99 views
Skip to first unread message

Günter Pütz

unread,
Jan 24, 2015, 6:56:37 AM1/24/15
to beagl...@googlegroups.com
Hi all,

I want to setup a webserver with node.js on the BBB rev.C. Since there is cloud9 and bonescript installed as default, it seems to be just a change of some setup files (scripts?).
Unfortunately I couldn't find any tutorial that explains the node.js thing from the ground up. What I know is that node.js is a java interpreter and a webserver must be written. But what is then? Is it started as a service when Debian boots? Where can I find these settings.
For example: since now there is a webpage called "/Support/bone101" running. I assume that the webserver behind is a node.js webserver, isn't it. If so, where can I change any script or config file to launch my own website?

Questions over questions....


William Pretty Security

unread,
Jan 24, 2015, 8:02:26 AM1/24/15
to beagl...@googlegroups.com

Point your browser at the IP address of the BBB, either the Ethernet one or 192.168.7.2 which is the USB one.

It will bring up a web page that will tell you everything you need to know J

 

"No one could make a greater mistake than he who did nothing because he could do only a little."

"All that is necessary for the triumph of evil is that good men do nothing" Edmond Burke (1729 - 1797)

http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book

http://ca.linkedin.com/pub/bill-pretty/2b/b07/602

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5645 / Virus Database: 4260/8941 - Release Date: 01/16/15
Internal Virus Database is out of date.

Günter Pütz

unread,
Jan 24, 2015, 1:13:04 PM1/24/15
to beagl...@googlegroups.com
Thank you William,

but I knew that. My question was how to setup a webserver with node.js on the bone. I found out now that the preinstalled webpage runs on the apache server. Perhaps you have some suggestions how to make a node.js server (written with express library) autostarting.

Robert Nelson

unread,
Jan 24, 2015, 1:14:45 PM1/24/15
to Beagle Board
On Sat, Jan 24, 2015 at 12:13 PM, Günter Pütz <puetz....@gmail.com> wrote:
> Thank you William,
>
> but I knew that. My question was how to setup a webserver with node.js on
> the bone. I found out now that the preinstalled webpage runs on the apache
> server. Perhaps you have some suggestions how to make a node.js server
> (written with express library) autostarting.

The default webserver on port 80 is node.js...

cloud9 which also runs off node.js is on port 3000

apache is running on port 8080..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Günter Pütz

unread,
Jan 24, 2015, 1:29:53 PM1/24/15
to beagl...@googlegroups.com
Thank you Robert!

I tried the ports and found out what you wrote.

Regards,
Günter

William Hermans

unread,
Jan 24, 2015, 9:05:20 PM1/24/15
to beagl...@googlegroups.com
I think it is important to understand that Nodejs is javascript *not* java. They are not interchangeable . . . So then if you would like to know how to write a web server using Nodejs, it really depends on what "libraries" you plan on using. Express, is possibly the most well known / used.

http://code.tutsplus.com/tutorials/introduction-to-express--net-33367 would be one such tutorial.

--

Günter Pütz

unread,
Jan 25, 2015, 8:10:31 AM1/25/15
to beagl...@googlegroups.com
Many thanks for your help, William!

The link about express you posted is a good start. I have also found out what I was looking for regarding the setup. At this point thanks to Robert as well.

Best regards,
Günter

Andrew Snider

unread,
Jan 26, 2015, 1:23:33 PM1/26/15
to beagl...@googlegroups.com
Here's a simple tutorial, not of express, but it will get you started & you could adapt express in there pretty easily.

Ryan Gosler

unread,
Jan 27, 2015, 2:58:38 PM1/27/15
to beagl...@googlegroups.com
I'd start by getting an SSH connection to your beaglebone.  Easiest way is to plug it into ethernet, find the IP (look on your router) and SSH into that.  Then I'd start working through the 'javascripting' and 'learn you node' nodeschool.io tutorials:


If you are familiar with javascript then skip the javascripting tutorial and do "learn you node".  I'm not sure I can recommend the Express tutorial there, unless they have updated it recently.  There is a lot to learn in this space.  Arguably working with Express requires a better understanding of HTTP than working with Apache and PHP/whatever.  After the nodeschool introductions I would follow the road map here:


I've worked my way through a lot of node.js tutorials and books and if I could go back, this is how I would do it.  Good luck!


-Ryan

000

Günter Pütz

unread,
Jan 28, 2015, 1:11:59 PM1/28/15
to beagl...@googlegroups.com
Thanx fot the tip, Ryan.

I could already do my setup with cloud9, express and all what I need -> thanks to the support that I got in the bbb community.

I am glad to be member of a community where people answer quick and with helpful information.
In Geman forums this is often not the case: everyone ist posting just for posting something.  The answers are often: "I have no idea" or "I must check that" or "use Google" :-[

Regards,
Günter
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/SRw0hARqTtk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

William Hermans

unread,
Jan 28, 2015, 7:52:53 PM1/28/15
to beagl...@googlegroups.com
Well, checking google is always a good idea. Which is how I've personally learned javascript, Nodejs, Express, and socket.io. But I do have well over 15 years programming experience with multiple languages, and have a fair understanding of current web technologies.

Now, if you ask *some* questions on these groups, you may very well get "no idea" or "google . ." but as it happens since I've taught myself all this Nodejs-ish / javascript stuff in the last year or so. I know the information out there is severely lacking in a few areas . . .

You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages