Posts

Showing posts from November, 2022

Deploy NodeJS Project in Ubuntu Server

Image
Let's See The Standard Way To Deploy NodeJS  Project with Nginx  Firstly I assume you already connected to your Ubuntu server. Now first command which you need to run is ~ sudo apt-get update (This command will update all default packages of ubuntu server with latest versions) Now let's install Nginx server ~ sudo apt install nginx Now you have to install Node JS and NPM (Please read this article for it) Now you can check with ~ nginx -v ~ node -v ~ npm -v  NodeJS - Education Funda In each above commands version should be written if not it means it not installed properly in your server. now go to cd /var/www directory -> From here create directory sudo mkdir domain.xyz . -> cd domain.xyz . From here take clone from your GIT branch ( Reference Link ) Now go to ~ cd yourCloneDirectory . -> From this directory just run your project ~  node app.js/server.js (your root file of node js project) Now just call your IP or Domain in your browser your project should run now .

Git Clone From Specific Branch

Image
For clone code from specific branch we can use below command: GIT - Education Funda - git clone -b branchName cloneUrl  Lets see some of the top and most commonly asked interview question related to GIT . I hope this quick tip will be helpful for you. Happy Coding !!

Installing Node.js in Ubuntu Server PPA

Image
Installing Node.js in Ubuntu Server with Apt Using a NodeSource PPA Node JS Installation - Education Funda To install a different version of Node.js, you can use a PPA (personal package archive) maintained by NodeSource. These PPAs have more versions of Node.js available than the official Ubuntu repositories. Node.js v14, v16, and v18 are available as of the time of writing. First, we will install the PPA in order to get access to its packages. From your home directory, use curl to retrieve the installation script for your preferred version, making sure to replace 18.x with your preferred version string (if different). curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh --------------------- You can inspect the contents of the downloaded script with nano (or your preferred text editor): nano nodesource_setup.sh ---------------------------- Running third party shell scripts is not always considered a best practice, but in this case, NodeSource implements their own logi