Question

Is it Premature for Me to Think in Terms of Hosting my "Toy" Webserver?

During the lockdown, I have started building a “toy” Webserver on my Windows 10 laptop, using Node and Express. It is not much past “Hello World” but I can access my pages from browsers with localhost URL’s.

I know my laptop’s IP address. It is connected to an ISP. I tried to access my site from my IPhone but it didn’t work. I know that the IP address is correct–I can access my site from a browser on my laptop using that IP address and the server’s port number (of 3000).

I would love to host my page somewhere and access it from my laptop, just to see how this is done. I don’t expect any outside users to access my site for the next several months, possibly forever. So, this will be just for testing purposes.

One of the options is to get the cheapest account from Digital Ocean.

  1. Is there a free trial period?

  2. If not, am I committing myself to a certain period of time?

  3. Can I move my project to a droplet without going through git/Github?

  4. What exactly do I get in my droplet? Can I get Windows 10 so that I can start my server there (just I do it locally)?

  5. Will I get an IP address for accessing my server?

  6. Is this all premature? Should I wait till my server is better fleshed out?

  7. My server might eventually be a place to serve my memoir. Something like WordPress will be the ideal choice. However, I am a retired programmer and Web development in itself is of interest to me. So, I have two conflicting goals: (a) Improve my Web skills (b) Get my message out to the world (so to speak).

Thanks.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
April 14, 2020
Accepted Answer

Hi there @shakervc,

This is a great question!

I don’t think that this is a premature decision at all. In my opinion, it is going to be a great learning experience to deploy a Droplet, install the necessary and upload your website/project and also it is quite fun and sometimes challenging if you do it for the first time.

I will try to answer all of your questions:

  • Is there a free trial period? - Yes, you can sing up via this link here $100 free credit to deploy any Droplets/Servers that you would like

  • If not, am I committing myself to a certain period of time? - There are no commitments, you can delete your server at any time and you will no longer be billed for it. You are also going to be charged per the hour so you can deploy/create a server, run some tests and delete the server after that, and you would be charged only for the time that the server was up, for example, if you go for the smallest $5 Droplet, it would cost you $0.007 per hour.

  • Can I move my project to a droplet without going through git/Github? - Yes you can use SFTP to upload your project to the Droplet directly without having to upload it to GitHub first.

  • What exactly do I get in my droplet? Can I get Windows 10 so that I can start my server there (just I do it locally)? - While creating a Droplet, you can choose the operating system, currently, you can choose between various Linux and Unix distributions like Ubuntu, Debian, CentOS, FreeBSD and a lot more.

I could recommend starting with Ubuntu as it is really well supported and a bit easier. There are also great tutorials on the DigitalOcean website on how to install NodeJS and Express on Ubuntu that you could follow:

https://www.digitalocean.com/community/tutorials/how-to-install-express-a-node-js-framework-and-set-up-socket-io-on-a-vps

  • Will I get an IP address for accessing my server? - Yes, each server comes with 1 dedicated IPv4 IP address

  • Is this all premature? Should I wait till my server is better fleshed out? - I think that it is going to be nice to gain some experience with setting up your own servers, that way you would feel more comfortable with it by the time your project is ready

  • Installing WordPress on the same Droplet as your main project would not be a problem at all, you can use Nginx as a reverse proxy to serve multiple sites or projects from the same Droplet.

On another note, you are not able to access your project from your phone probably because of a few things:

  • Your Phone needs to be connected to the same network
  • You need to open port 3000 via your Windows Firewall for incoming TCP connections

If you want to access your project from the outside world, what you need to do is set up Port Forwarding via your home router, so that the traffic is forwarded from your public IP to your local network accordingly. However, if you decide to go with creating your Droplet instead, making those changes to your router would not be needed.

Hope that this helps! Good luck with your project and keep us posted with the progress! Regards, Bobby

More success.

I did the prep steps listed here.

[Initial Server Setup with Ubuntu 18.04] (https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04)

I also did the following steps to install distro stable nodejs

sudo apt update sudo apt install nodejs sudo apt install npm

These are described in

[How To Install Node.js on Ubuntu 18.04] (https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-18-04)

I then did the following:

npm install --save express npm install --save handlebars

And voila, I was able to run my application successfully, without having to upload node_modules from my laptop.

I am again beyond thrilled.

I don’t remember installing nodejs and npm on my laptop. (I do remember installing express and handlebars.) I guess that I must have done it.

Shaker

I was able to run my server from the droplet and access it from my laptop. So were a couple of friends living in different locations.

I am beyond thrilled. I have a ton of cleanup to do and am sure will have a lot of questions.

Digital Oceans is very easy to work with.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel