Setting up a Node.js app on a Linux AMI on an AWS EC2 instance with Nginx
Introduction
Node.js is a JavaScript runtime environment that allows one to run JS on the server. It is built on the open-source V8 JavaScript engine used in Chrome and written in C++ which executes JS in a standalone environment.
AWS (Amazon Web Services), a subsidiary of Amazon, is a cloud computing platform which provides resources for computation such as EC2 instances, various database and storage facilities as well as networking and content delivery options.
Nginx is a free and open-source HTTP server which doubles up as a reverse proxy server or as a mail proxy server. It is a high performance server with simple configuration options and low resource consumption.
EC2 (Elastic Compute Cloud) is a web service which provides computing power in the form of scalable server instances. Multiple EC2 instances are run on the same machine inside Amazon’s computing infrastructure. When an EC2 instance is initiated, a set amount of resources (OS, RAM, Disk Space etc., chosen at the time of initiation) are allotted to the user from the machine it runs on. This allows sharing of resources between multiple users.
Linux AMI is a copy of Linux (image) provided by AWS which can be used for free on an EC2 instance as an OS. It can contain pre-installed packages such as Python, MySQL, Node.js etc., depending on the chosen AMI.