December 8, 2022

Steps to set up new AWS EC2 instace to deploy NodeJs application

 



Follow below steps to set up new NodeJs application on AWS EC2 instance:

1. AWS - Create new instace (Download .pem file)

2. Connect EC2 install using .pem file (sudo ssh -i <.pem file full path> ubuntu@<instace Public IPv4 address>)

2. Install nginx (sudo apt install nginx)

3. Install NodeJs (sudo apt install nodejs)

4. Install NPM (sudo apt install npm)

5. Install postgreSQL (sudo apt install postgresql postgresql-contrib)

6. Allow port(5432) for postgreSQL: Goto > instace > Security > Security Groups > Edit inbound rules > Add rule

6. Install git (sudo apt-get install git)

7. Install pm2 to run Node application (https://www.npmjs.com/package/pm2)

8. Now server ready to used you need to get git clone of your project repository.


Enjoy!

December 7, 2022

Steps to update or change NodeJS and NPM versions.


 


1. First let's try to change NPM package version.

- Check current NPM version: npm view npm version

- Using this command you can update npm to latest version: npm i -g npm


2. For Node version best way to manage version use NVM.

- nvm install <Node version> 

- nvm list

- nvm use <Node version>


3. To update NPM:

- npm install -g npm


Enjoy!

The Future of Technology: Emerging Trends to Watch in 2025

Introduction As we navigate through 2025, the technological landscape continues to evolve at an unprecedented pace. Innovations that once se...