30
Hosting on Github
Hosting might cost in most cases but if want to learn web development in initial stages you can host it on GitHub for free.
Github provides a spetial repo <USERNAME>.github.io
in which most of the simple port portpolio using HTML and CSS can be deployed directly.
Github Pages is an another way to host websites as siple as an react project can be hosted. In this article i will explain bits and pices you need your site to be up and running.
First include deployment steps in the scripts section of package.json
"homepage": "https://mallikarjunht.github.io/Portfolio",
"scripts": {
"predeploy": "npm run build", // bulid a deployable package web optimised
"deploy": "gh-pages -d build", // push build folder to gh-pages
...
}
npm run deploy
your code is deploied you can acciss it in
<USERNAME>.github.io/<PROJECT_NAME>
hear is my portfolio on github
https://mallikarjunht.github.io/Portfolio/
Referances
Official Documentation
30