Overview | |
---|---|
JSX HTML | <div>...</div> |
JSX Component | <Component property={javascript} /> <Component property='string' /> |
JSX Component with Children | <Component>{children}</Component> reference: props.children |
Escaping JavaScript | {...} |
require statements |
const React = require('react'); const ReactDOM = require('react-dom'); |
npm modules |
react , react-dom |
This file contains hidden or 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
* { | |
outline: 3px solid limegreen !important; | |
background: rgba(0, 151, 0, 0.1) !important; | |
} |
This file contains hidden or 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
let regex; | |
/* matching a specific string */ | |
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
/* wildcards */ | |
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
This file contains hidden or 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
man COMMAND # Look up help for the given command | |
pwd # Print working directory | |
cd MYDIR # Change directory to MYDIR | |
cd ~/ # Change directory to user root (/Users/USERNAME) | |
cd .. # Change directory up a level | |
mkdir NEWDIR # Create a new directory in the current folder called NEWDIR | |
cal # View Calendar in terminal |
This file contains hidden or 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
========================= | |
for (const key in req.query) { | |
console.log(key, req.query[key]) | |
} | |
========================= | |
The query string is the part that comes after the URL path, and starts with a question mark ?. |
This file contains hidden or 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
https://qd63qcai7ta411io-4710885.shopifypreview.com |
In this tutorial, I will be going over to how to deploy a Django app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app Hygge Homes (a vacation home rental app for searching and booking vacation homes based off Airbnb) and we wanted to share with other developers some of the lessons we learned along the way.
Following this tutorial, you will have an application that has:
- An AWS EC2 server configured to host your application
- SSL-certification with Certbot
- A custom domain name
- Continuous deployment with Github Actions/SSM Agent
NewerOlder