If you have your application code in vs code or any text editor.
step 1: Open command prompt
step 2: Give command git init (This will initialize a git repository in your
step 3: Open Github.com
step 4: Create a new repository
step 5: open gitbash and go to your project folder
step 6: Generate ssh keys.
give command : ssh-keygen -t rsa -b 4096 -C "your mail id"
press enter for all question asked.
step 7: To make sure our app is running give command : eval "$(ssh-agent -s)"
step 8: To register the file we need to give the command: ssh-add -K
step 9: copy the remote origin link from your github repository
example: git remote add origin https://github.com/keshri1/NodeJs.git
step 10: Generate ssh keys in git bash,copy it and add to github settings.
give command : cat ~/.ssh/id_rsa.pub t(to geneate ssh keys in
step 11: To check whether our key has been set up successfully or not give
command: ssh -T firstname.lastname@example.org
step 11: Now give command
git push -u origin master
Now your code has pushed to git hub.
Next Download heroku cli.
open vs studio command prompt do the following steps:
go to project folder
login to heroku website
give command :
this will automatically take ssh key of the project
Next give command to create heroku application
heroku create my-portfolio
Next give command to publish to heroku
git push heroku master
- From Visual studio command prompt give command Git init
- git add .
- git commit -m "initial commit"
- Open heroku.com and login/Signup
- Download heroku cli
- Give command heroku create
- It creates two links, the first one is the address we need to give whwnever we need to visit our application.The second link is our deployment target, a git repository where we can push our local server
- copy second link and give command git remote add heroku second link Its okay if you get this msg (fatal: remote heroku already exists.)
- Give command git push heroku master
- Now give heroku open which opens your project in browser.