How To Deploy Your Frontend and Backend in Vercel and Hostinger
How To Deploy Your Frontend and Backend in Vercel and Hostinger
➢ Go to https://vercel.com/
➢ Select the option that says continue with github and click enter.
➢ Your browser should show something like this.
➢ Go back to the terminal of your frontend code and type vercel in the terminal.
➢ Type “y”
➢ Click enter.
➢ Click Enter
➢ If the result is something the like this, then your frontend is good to go(almost)
➢ Go to your vercel Dashboard and click the project you just deployed.
➢ Click the Connect to Git
➢ It may prompt you to install vercel to your github, just click continue to install vercel.
➢ If you’re using a shared account, then click that manage in the account.
➢ Click the Website name Dropdown to select which website you’re going to use.
➢ In the Directory text field, follow this kind of naming your directories/folder.
➢ Go to the line 34 and change the two periods to the name of the second folder you’ve been to.
➢ Click CTRL + S to save or just click the save button at the upper right of the screen.
➢ You should be able to access your backend by accessing your-domain/the-first folder-inside-public-html.
➢ Now Copy the link of your deployed backend and paste to the axios.defaults.baseURL in the main.js of your
frontend.
➢ Copy the name of your newly created database in hostinger and paste it there.
➢ You might encounter an error in the collations, so change all collations in your tables to “utf8mb4_swedish_ci”.