1

I am new to api writing, I have purchased web server now I came to now I have to purchase application server to upload my api code (written in nodeJs). I need to know,

  1. can i upload my api code to web server?
  2. if not, then what server i need to purchase ? and what configuration setting need to set (any tutorial which can tell basic of web and application server would b highly appreciated).
  3. I am beginner to api development in nodeJs. what should i need to learn to a effective node developer.
2
  • "i have purchased web server now i came to now i have to purchase application server" Not sure what you mean there but Node.js requires a dedicated server or a VPS to run you know that right? "I am beginner to api development in nodeJs. what should i need to learn to a effective node developer. " It's documentation nodejs.org/en/docs? Commented Oct 26, 2018 at 14:31
  • I am beginner to all this stuff, can you please elaborate the process of uploading api? like need to purchase vps then what configuration we need to set to run node js code ? what softwares should i need to use ? Commented Oct 26, 2018 at 14:46

1 Answer 1

2

In order to deploy you Node.js application, you will be needing a VPS. When you have VPS, it's like having a machine with an Operating System most probably linux with an public IP.

After getting a VPS, you access it via SSH with either a key or password, after which you will get into the terminal of your VPS. Now, you can do almost everything that you do in your local machine or workstation - from installing and running Node.js application to serving static web pages through Apache or Nginx. So you install Node.js and all other required processes and run your code in some port - like you do in your own machine. Then your application can be accessed through the public IP provided to you. Manually setting up your application is done if you are provided with only an instance(the term may vary among service providers)

Many Providers may also provide you with pre-created containers for Node.js where you will just have to deploy your code and they will configure everything and run it.

For testing purpose, there are some options which are free:

  1. Openshift: It is absolutely free for one project but will terminate if inactive for a long time. It is pretty much straight-forward and easy to deploy
  2. Heroku: It is also free for one project. It has a cap of 720 hours for your application to run per month. You need to install heroku-cli and might be a bit tricky for beginners.

There are some clouds that also provide free services requiring your credit card information:

  1. AWS: It provides one year free trial known as 'Free Tier Plan'.
  2. GCP: It provides $300 worth of free credit.
  3. Alibaba Cloud: It's website says "Enterprise Level Customers Enjoy a Free Trial Worth $1200"

If you are looking for a low price VPS, then you can also have a look as Vultr.

Since you are a beginner, I suggest you to get a VPS and setup everything manually. This way, you will have knowledge of servers and how they work.

Here are some links that might be useful:

  1. How to log into a server via SSH
  2. Installing Nodejs on server
  3. Running Nodejs for production
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.