Skip to main content

Posts

GitHub Repo Collaboration Work on single project

 =============================================== To collaborate effectively with your friend on the same project, you should use Git branches to manage different lines of development. Here's a step-by-step procedure you can follow to streamline collaboration: 1. Create Separate Branches for Each Developer Create a New Branch for Your Friend: On your local repository, create a new branch for your friend. For example if your friend name is kilvish , if you want to create a branch named kilvish , you would run: make sure you would be on main branch already   command->  git checkout -b kilvish git push origin kilvish 2. Set Up Your Friend’s Environment( On your Friend's System )  at kilvish side  run ->  Clone the Repository (if not already done): If your friend hasn’t cloned the repository yet, they should do so: command ->  git clone https://github.com/Vasu-Birla/your-repo.git   // your your main clone line  Fetch All Branches: After cloning, your friend should fetch
Recent posts

How to create build of Your React App and server it for Forever using PM 2

Solution 1: Use Node.js's native import with pm2 You can directly use the native node command with pm2 to run the serve command. Here's how: Install serve as a local dependency if you haven't already: bash npm install serve Start the app using pm2 with node and serve : bash pm2 start "node --no-warnings --experimental-json-modules ./node_modules/.bin/serve" --name "react-app" -- -s build Solution 2: Use a serve script in package.json Another approach is to create a script in your package.json to run serve , and then use pm2 to start that script: Add a script to package.json : ( package.json of frontend folder ) { "scripts" : { "start:serve" : "serve -s build" } } Use pm2 to run the script : pm2 start npm --name "react-app" -- run start:serve Solution 3: Using a custom script with pm2 If you want to avoid npm scripts, you can create a custom Node.js script to run serve using ES Module

How to Create PhpMyAdmin for AWS Linux of Ubuntu Server

/============================================================================================================================================= ANother way   setting up phpMyAdmin on Ubuntu Server 22.04. Let's go step by step to get phpMyAdmin working correctly for you: Download phpMyAdmin : First, ensure that you have phpMyAdmin installed on your server. You can download it using the following command: bash Copy code sudo apt update sudo apt install phpmyadmin During the installation, you will be asked to choose a web server. Select apache2 using the arrow keys and press Enter. Now after this the most important work is to set it on URL for example on server's root URL or IP if you have already deployed any python or node project and you want to access phpmyadmin outsite of that Document Root then you have to use Allias for example your server url is 195.35.23.26 and you want to access it on http://195.35.23.26/phpmyadmin/ then you have to make changes in your default

How to to deploy python app sepratly on same server (previous one ) /root/demo - Deploy Python app on Ubuntu Server using ssh Terminal - by Vasu Birla

hello friends , am Vasu Birla and Today we will deploy Python App.. in previous post we have deployed NODE js app on 0.0.0.0 (your server IP) and acess it using http://0.0.0.0/   Now  If you want to deploy a Python app separately on the same server, in the /root/demo directory, and access it using http://0.0.0.0/demo,  you can use Apache2 and mod_wsgi to host the Python app.   Additionally, you can configure Apache2 to proxy the requests for the   /demo path to your Python app without affecting the Node.js app hosted at the root.   First of all  put your python project folder on root location of server , using putty with cloning git repo or using FTP server and direct paste folder (in previous post we aleady discussed it)   lets suppose your folder name is demo .. location would be  /root/demo   install necessery things to support your python app .  like pip install or django ..etc     as well install in virtual enviorment also ..       -> python3 -m venv venv        -> source v

How to deploy NodeJS app on server with Apache2 and acess it with Server IP addresss - Node JS deploy project Live.

     hello friens , This is Vasu Birla , in previous post we have seen the deployement of NodeJS app on AWS instance server instance but AWS server is expensive than other servers . SO today we will use simple Ubuntu server for making Live out Project using Apache2 . At the end you will be abe to access your NodeJS app using server IP address from anywhere  .. 1.  Login to your server using SSH terminal . (in AWS part i already explained how to do this )     -> Open your putty in hostname put your server IP -      login with ssh username ->root and password     (if you dont have root username and pass ask your      provider or reset it from cpanel or hosting panel ) 2. after login - on terminal you can Put your project anywhere.     There are two ways to put your project folder on server location     (i) - > using Github - (very popular and easy to track your everyday code changes to your project folder)             you can push your entire project folder to git-hub and and

How To create Chat Server using - PHP with MYsql db connectivity

//-------------- Chat server BY Kilvish ------------ <?php // Establish MySQL database connection $servername = "localhost" ; $username = "root" ; $password = "" ; $dbname = "chatdb" ; $conn = new mysqli ( $servername , $username , $password , $dbname ); if ( $conn -> connect_error ) {     die ( "Connection failed: " . $conn -> connect_error ); } // Retrieve chat messages from the database function getChatMessages () {     global $conn ;     $sql = " SELECT * FROM chat_messages ORDER BY created_at ASC " ;     $result = $conn -> query ( $sql );     $messages = array ();     if ( $result -> num_rows > 0 ) {             while ( $row = $result -> fetch_assoc ()) {             $messages [] = $row ;         }     }     return $messages ; } // Insert a new chat message into the database function insertChatMessage ( $username , $message ) {     global $conn ;     $sql = "

Convert any web page to pdf and save it to Server location - Using AJAX javascript and PHP

 Saving PDF file on local machine is easy - but  if you want to save it on server location - then we have two waays ..  1. Using JavaScript AJAX call ...  2. Using PHP  package -  wkhtmltopdf =====================1. JavaScript Way -============================ pdfmaker.php or .html  < div id = "kil" >       <!--  your can use URL or path for image -->           < img id = "kil2" src = "../folder/vasu.png" >     < p >         Kilvish is the Biggest villan of the Earth Planet.     </ p > </ div > <!-- Include the jsPDF library --> < script src = "https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.4.0/jspdf.umd.min.js" ></ script > < script src = "https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.3.2/html2canvas.min.js" ></ script > < script src = "https://code.jquery.com/jquery-3.5.1.min.js" ></ script > < script > window . jsPDF = win