Where to install Node.js and other such programs/tools - javascript

I have two computers.
Computer 1 is a Windows 7 computer. It is my main computer where I use it for web browsing, gaming, paying bills, etc.. I also use it for all of my development work. I am currently using Visual Studio Code and to a lesser extent Visual Studio 2015 Professional. My main focus at this time is Javascript, PHP, HTML, CSS.
Computer 2 is Linux Ubuntu that i have configured as a web-server. I used the tutorials from Digital Ocean to create the web-server.
I currently own two domains purchased through google domains and I have two simple websites that I am currently hosting on this web-server. The websites were built using a combination of PHP, Javascript/JQuery, HTML and CSS.
I wish to expand my knowledge base so I have recently started looking at Node.js and will also be looking at Angular.js and other .js's.
I installed Node.js on Computer 1, my 'daily/development' computer. My question is do I need to install it on my WebServer? I wrote a small Node.js web app on my development computer and moved it to my server and it worked but I am not sure if this would work for something bigger. I know I could just write something and experiment but I was hoping to get some advice from others who have a similar setup before I go down a frustrating path.
In general, if you have an 'everyday/development' computer and a separate dedicated web-server, how do you know where to install things like Node.js, Angular.js, etc... I have viewed numerous tutorials on You Tube and Plural Sight about these tools/languages/frameworks but the vast majority of them do not seem to address equipment issues, which I guess makes sense. I know there is a Plural Sight course that is actually dedicated to set up a development environment and I tried to follow it but it was a little too advanced for me.
Thanks in advance for the guidance!

It doesn't matter. Install them on the machine you are more comfortable for you.
In general, if you have an 'everyday/development' computer and a separate dedicated web-server, how do you know where to install things like Node.js, Angular.js, etc...
If you want to learn and test stuff it doesn't really matter on what computer you are going to install them. For example I have a RaspberryPi ubuntu server which is online 24/7. I write my code/apps on my development machine (which I use only when I'm coding/playing games/doing work) and then migrate/move the code and run it on the linux server. (You can see what git/bitbucket is).
And don't worry to make the wrong decision with your setup - you will learn a lot like that. By the way there is no right or wrong answer here.

Related

Can you write in AngularJS without any sort of preinstallation?

About a month ago, I broke my computer out of stupidity. Today, I was given a computer from my aunt-the downside, it's pretty old and doesn't take WiFi as an internet input (only ethernet). So, I decided I'd just take what I was given, and use good ol Notepad and Edge to create a webpage using Angular. Now, I am by no means an expert in this stuff, I just wanted to experiment with what I could. That is, until I can get the Ethernet set up.
Because of my incapability to use WiFi, I can't install the library/framework through Npm in the Cmd (and I presume I can't script src a link for the same reason). However, I see that Angular is "100% JavaScript" so I thought that there might be a way to do so.
TL;DR ~ Can I still write in AngularJS without WiFi?
You will need be able to download the AngularJS or Angular libraries before you can start developing Angular applications. Until you can get internet access so that you can use NPM, you will have to ask someone to download the necessary files so you can develop with Angular. If you are new to Angular or unless there is a valid reason to start learning AngularJS(angular versions before version 2) then I would start with Angular. You will learn newer technologies such as Typescript, ES6, RXJS, etc. If you are new to web development and/or build systems I would take a look at Angular CLI. It will allow you to create Angular apps quickly without creating all the boiler plate code from scratch.
Yes.
You should be able to start up a localhost with something like NodeJS, MAMP, or some other server language.
If you can not create an http connection with a localhost, it shouldn't work as most modern browser sandboxing will prevent your JS scripts from being able to load.

Node.js - Taking it public?

I'm learning how to program in Node.js, and so far I've been able to run it using my computer as a server, and log in through an IP address:8080 from other computers on the same router. But for the life of me, I can't seem to find any tutorials or anything for taking it public. E.g using my laptop from work to connect to the server hosted at home. I've searched free servers and am completely mixed up on SSH keys and github requirements and stuff with a bunch of others. I'm really mixed up.
I'm also thinking it would be much simpler (and 100% free on monthly payments) to buy my own hardware and run my own servers? Any tutorials on node.js hardware set ups?
Please help, I'm completely confused.
EDIT
I seem to have been a bit unclear. I'm going to use node.js to make games/apps with logins. When you "login" you automatically login to the server also. Not only from "work to home", I meant completely public as a multiplayer game.
One easy way to setup a node server for free is using AWS Free Tier.
Once you follow that link and setup a server...
You can follow along with this tutorial to get your server up and going, install node, install mongodb and even make an app that will run on the live server.
Run throgh this tutorial
How I installed node on my server,
Personally I have a VPS from Bluehost. This cost me about $120 a month but lets me do whatever I want with my server. By whatever I want I mean install whatever I want...
I have npm install,
I installed node.js globally.
I installed mongoDB.
I can run mongodb applications from anywhere and connect them to the MongoDB running on my server.
Having a VPS can come in handy as you can see... I suggest AWS free tier. Learn how to install all the things you want. Play with it. Break it and start over.
But when your done with all of that...
Be a Jedi Master!
Node doesn't have any specific hardware requirements or configuration. And can be hosted on anything.
I guess you don't have a dedicated ip address. So, your question seems to be all about network, routing and dealing with NAT. If you're not familiar with those, it might be not a bad idea to use external hosting.
But if you want to give it a try, this might be helpful - https://superuser.com/questions/121435/is-it-possible-to-host-a-web-server-from-behind-a-nat
Besides hosting your own hardware, there are 2 options for what you describe.
One, use a portforwarding tool to make your home server accessible from your work, for example ngrok.
Two, deploy your node.js app to an online platform, for example OpenShift or Heroku. Most of these platforms have a low-performance free options.

Is it possible to run PHP/JavaScript on an Android server?

I've been tinkering to create an Android server now. Not an actual web server though; only one that would be accessible through WLAN connections to share files.
I've managed to build one using Apache HTTP libraries, thanks to this wonderful guide. However, now I wanna set up the game a lil' bit by running some scripts.
The question is, is it possible to do so?
I've tried googling for clues but that one above was the best I could find.

Javascript not working on downloaded websites

So recently I was looking at some well-designed websites, with the functionality that I want to achieve / learn.
However, the problem is, that even though I manage to download the complete website (most recently I was using Scrapbook from Firefox), the website is not fully functional. Seems like the JS isn't working..
For example, a page like this.
When downloaded, the animations, progressive loading etc. are missing. I am guessing it's using Ajax to communicate with the server then?
Or what's the reason? Is there a way to get it working?
Cheers.
Most probably this is due to some scripts needing to be served from a domain name instead of localhost (your local machine). Your best bet is to learn how to set up a local web server with a package like XAMPP or MAMP. This is useful way beyond serving downloaded sites to inspect how they work. You can actually have a complete development environment this way.
Bonus tip: check out sites like Code Academy to learn even more about the ins and outs of web programming languages.

Is Meteor.js stable enough for production?

I was really amazed about's meteor.js features and ease of use, im really falling in love with it. I just wanted to know if you expert guys think it is stable enough for using it in production for a medium sized project.
Thanks for your advice!
Update Nov 2014:
Meteor 1.0 was just released, this is the first ready for production version finally, more on meteor check out this link
6 months with Meteor has the best answer to this question I've found so far.
Here are a few excerpts:
Meteor can’t be used for all real-world apps just yet. Meteor doesn’t have server-side rendering yet, so it’s not ideal for sites that need to load very fast (like e-commerce
sites) or work on underpowered devices (like older mobile phones).
...
So I would say right now Meteor will be a perfect choice for a few apps (anything that strongly depends on real-time interactions), a great choice for most of them, and a very bad one for a few specific cases.
It sounds like Meteor is definitely promising and particularly well-suited for real-time essential web apps, however it's not production ready for all web apps at the moment. At the time of writing this meteor is at version 0.7.0.1.
It's hard to answer this, because use cases vary so much.
I have an in-house application running on Meteor, which is basically a web-based SMS client with address book, fully integrated with our custom, in-house CRM. The Meteor app has 25 simultaneous users, and has been used to send or receive 70,000 SMS messages over the past 5 months, with total downtime measurable in minutes (which was due to network outages, not a problem with the application or framework).
There are definitely missing features, but assuming the features you need are implemented, the framework can be stable enough for production.
Really depends on what you're doing and how many users will connect to it. Using the current version 0.6.x you will need to tweak things that maybe Meteor devs are going to tweak, like MongoDB operations. Also, many packages are going to be released in future that will help a lot some work you are going to build yourself right now (for e.g. the IronRouter that C. Mather is building is very complex to build but very useful if you need complex operations in your app, like subscribing automatically in certain views, building forms etc)

Categories