I decided to deploy my prototype for the Hackurculture hackathon to Heroku. Found a useful video that helped me and I thought I should share.
Creating Heroku App With a name
In his tutorial he did not specify a name for the app so one was generated randomly. To create your app with your desired name:
heroko create yourAppName
To change the random name generated:
heroku apps:rename newAppName
Error: Refspec master does not match any
error: src refspec master does not match any.
error: failed to push some refs to ‘https://git.heroku.com/izikoapp.git’
When you use this command: git commit -m ‘initial release’, you might have seen this:
*** Please tell me who you are.
git config –global user.email “email@example.com”
git config –global user.name “Your Name”
to set your account’s default identity.
Omit –global to set the identity only in this repository.
fatal: unable to auto-detect email address (got ‘michelleenakeno@mac.(none)’)
Set up your email and name. In my case I did the set up for the current project directory (omit –global)
git config user.email "firstname.lastname@example.org" git config user.name "My Name"
Run the command again:
git commit -m "initial release"
Everything should be working fine now.
Laravel 8 Auth
Install Laravel UI package
composer require laravel/ui
Generate auth scaffolding
php artisan ui vue --auth
Install npm dependencies
npm run dev
Upgrade PHP version
#update brew brew update #this command will install php7.4 and other dependencies brew install email@example.com #or you can use this command instead brew upgrade php
When I use the command ‘php -v’, I still get the ‘php7.2‘. Here’s how to switch to the newer version.
Find the .bash_profile file. In my case the path: /Users/michelleenakeno/.bash_profile
Edit with ‘TextEdit’ and add this:
Save and close. Check your current php version and you should see 7.4
NOTE: if you are not sure about where your php path is, you can use the old path location as a hint. Use this command:
If you check your current php version and the changes haven’t reflected, close your terminal and open it again or use this command:
source ~/.bash_profile reset
NOTE: you can edit the .bash_profile directly from the command line by using this command:
Update composer in the command line. CD into the directory where you installed composer.
#find composer path with this command composer config --list --global #look for this line -> [home] /Path/To/.composer #change directory and update cd .composer composer update
Laravel Global Variable
Use the same technique for adding ‘php7.4‘ path to .bash_profile.
Packagist could not be fully loaded
Error: http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Use this command:
composer config -g repo.packagist composer https://packagist.org composer config -g github-protocols https ssh