How To Deploy Single Page Applications Bootsraped by Create React App to surge.sh
Have you heard about surge.sh ? If someone ask me that question 2 days ago, my answer, for sure, is "Nope". I just found this surge.sh yesterday when I tried to publish a simple todo list app built with React JS, React Router and Redux to GitHub project pages. Unfortunately, the application router didn't work smoothly under https://{username}.github.io/{repo-name}. Instead of changing my working code, I decided to find other free static hosting providers. I found surge.sh somewhere on the create-react-app guide. I install it globally using npm, then I typed surge command under the project directory, and boom the app is online on a surge.sh subdomain. It is fast and easy to deploy our static file to surge.sh. So, In this React JS tutorial, I will show how effective deploying our React JS app to surge.sh. Installing the surge.sh cli We will install it locally inside our project dev dependecies using npm: npm i surge --save-dev or yarn: yarn add surge --dev . I ...