Posts

Showing posts from November, 2023

HTML5 Blank Template

Image
<!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Document</title> </head> <body> </body> </html> 

Commands Given By Git

Image
 Hi, In this blog we will see default commands that we get after creating repository in git. Creating a new repository on the command line echo "# d" >> README.md   git init   git add README.md   git commit -m "first commit"   git branch -M main   git remote add origin https://github.com/<git-username>/<repository-name>.git   git push -u origin main Push code to an existing repository from the command line git remote add origin https://github.com/<git-username>/<repository-name>.git git branch -M main git push -u origin main

Common Commands Used In React

Image
  1) For creating react app. npx create-react-app <my-app-name>  {fast command} Ex:    F:\React JS TS\RTCV3\myreactdemo> npx create-react-app myfirstapp 2) To run react application npm start Ex: PS F:\React JS TS\RTCV3\myreactdemo\myfirstapp> npm start 3) To install git hub pages  npm install gh-pages --save-dev

Deploying React Application Using Github Pages

Image
 Step 1. Create the GitHub repository first   Step 2: Execute below commands {below commands are available after creating Git Repository} git init git add . git commit -m "first commit" git branch -M main git remote add origin <origin> git push -u origin main Step 3: Adding the GitHub Pages dependency packages npm install gh-pages --save-dev Step 4:  Adding the properties to the package.json file The package.json file is been configured so that we can point the GitHub repository  to where our react app is been deployed. The first property we have to add is at the top  of the package.json file which will be given the name “homepage“, and the value for it will be in the following format: "homepage": "https://<Username>.github.io/<Repository-name>" Then we will add “deploy” and “predeploy “properties in the script field with the following values: "scripts":{     "predeploy": "npm run build",     "deploy...