title: Setting Up Laravel in Ubuntu / DigitalOcean keywords: servers, laravel, coderstape, coder's tape description: Let's take a look at settting up a server from scratch for Laravel. date: April 1, 2019 tags: servers, laravel permalink: setting-up-laravel-in-ubuntu-digitalocean img: https://coderstape.com/storage/uploads/GZTXUbyGum2xeUZM9qBD5aPv8EKLwG3C8RGcRon4.jpeg author: Victor Gonzalez authorlink: https://github.com/vicgonvt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* From https://www.usps.com/send/official-abbreviations.htm */ | |
$us_state_abbrevs_names = array( | |
'AL'=>'ALABAMA', | |
'AK'=>'ALASKA', | |
'AS'=>'AMERICAN SAMOA', | |
'AZ'=>'ARIZONA', | |
'AR'=>'ARKANSAS', |
See how a minor change to your commit message style can make a difference. Examples
Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GetFreePort asks the kernel for a free open port that is ready to use. | |
func GetFreePort() (port int, err error) { | |
var a *net.TCPAddr | |
if a, err = net.ResolveTCPAddr("tcp", "localhost:0"); err == nil { | |
var l *net.TCPListener | |
if l, err = net.ListenTCP("tcp", a); err == nil { | |
defer l.Close() | |
return l.Addr().(*net.TCPAddr).Port, nil | |
} | |
} |
This is a summary of how to start your own NextJS app, create the repo on Github, upload later in an AWS EC2 Instance and automate the process with AWS Codebuild, CodeDeploy, & CodePipeline.
After following these instructions you should be able to:
- Create a NextJS App
- Create an AWS EC2 instance
- Be able to SSH to an EC2 instance
- Prepare the instance as a Node environment
- Configure Nginx service for proper routing
- Configure domain and add SSL