How do I host a NodeJS http web server on a raspberry PI/or any linux based PC
Asked Answered
T

1

7

I've seen people host Apache servers on raspberry PI's and of course on regular computers. I do not wish to or rent a VPS and thought it would be best to set one up on my Raspberry PI 2 B:

(1gb ram/32gb disk/1ghz on overclock)

What is the proper way of setting up a NodeJS http web server on a computer? Can you link me to a tutorial if one exists(Couldn't find any).

I was also wondering if I would be better of renting a VPS with recurring costs and lack of customization/control , or on a working dedicated PC. Keep in mind that I wish to practice some dev ops work over multiple PI's(ex. Chef).

I need this server to be accessible through the internet through an ip or domain. How do I go about setting that up? (I have domains)

Update: I wrote a blog post on this subject.

The tutorial goes through the full installation process. Click the link below

Hosting a Node.js HTTP server on a Raspberry Pi

Trichroism answered 5/2, 2015 at 23:41 Comment(5)
Great blog post, I am thinking about buying a Pi for this exact purpose, this helps. Thanks!Aqaba
The nodejs provided by apt-get is outdated, you better get the latest one from the official site nodejs.org/dist/latest (arm armv6 for raspabrry pi 1 and armv7 for raspberry pi 2 or 3)Rentfree
Answers do not belong in the question, so your "update" has been rolled back. If you'd like to answer your own question, you should do so. However, note that a YouTube video is not a sufficient answer---you need to summarize the relevant portions of the video so that your answer here is complete and self-contained. The link should only be as an additional reference.Enrica
This question needs to be closed cause it's far too broad and asks for third party tutorials which is not allowed on SO.Nabila
the link is't liveGreta
R
0

Yes, You can use raspberry as your VPS or dedicated server. Just assign static IP address(You need to buy) to your Raspberry and then point your domain name to that static IP address.

Few links below that will be helpful for you,

Reamer answered 10/2, 2018 at 15:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.