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
# brew install nginx | |
sudo ln -s /usr/local/opt/nginx/homebrew.mxcl.nginx.plist /Library/LaunchDaemons/ | |
sudo chown root:wheel /usr/local/opt/nginx/homebrew.mxcl.nginx.plist | |
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist | |
# Why do you need sudo? | |
# If you want nginx to be able to bind to port 80, it will need superuser privileges |
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
{ | |
"functions": { | |
"source": "functions" | |
}, | |
"hosting": { | |
"public": "build", | |
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"], | |
"rewrites": [ | |
{ | |
"source": "/api/hello", |
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 | |
$url = 'http://maps.googleapis.com/maps/api/staticmap?'; | |
$bits = array( | |
'center' => 'Calgary Tower, Calgary, AB, Canada', | |
'zoom' => '16', | |
'size' => '800x600', | |
'maptype' => 'roadmap', | |
'markers' => 'color:0x576d4e|label:N|49.6967179,-112.8450119', | |
'sensor' => 'false', | |
); |
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 | |
// See Error Handling in PHP: https://nomadphp.com/2015/02/25/nomadphp-2015-02-us-lt2/# | |
$display = function ($status, $headers = array(), $content = '') { | |
http_response_code($status); | |
foreach ($headers as $key => $value) { | |
header($key . ': ' . $value); | |
} |