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
docker@boot2docker:~$ curl 0.0.0.0:49159 | |
<!DOCTYPE html><html><head><title>Express</title> | |
<link rel="stylesheet" href="/stylesheets/style.css"> | |
</head><body><h1>Express</h1> | |
<p>Welcome to Express</p></body></html> |
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
sudo docker commit 4045042195f9 ngsmrk/express_image_01 | |
sudo docker images | |
sudo docker push ngsmrk/express_image_01 |
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
ssh -i ~/.ssh/docker.pem ec2-user@<ip_address> | |
sudo yum install -y docker ; sudo service docker start |
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
sudo docker run -t -i -p 3000 ngsmrk/express_image_01 /bin/bash |
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
cd /home/docker/dev/test_app | |
DEBUG=my-application ./bin/www |
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
[ec2-user@<ip_address> ~]$ sudo docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
bc1b8759a328 ngsmrk/express_image_01:latest /bin/bash 15 seconds ago Up 13 seconds 0.0.0.0:49154->3000/tcp loving_pare |
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
[ec2-user@<ip_address> ~]$ curl 0.0.0.0:49154 | |
<!DOCTYPE html><html><head><title>Express</title> | |
<link rel="stylesheet" href="/stylesheets/style.css"> | |
</head><body><h1>Express</h1> | |
<p>Welcome to Express</p></body></html> |
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
static void init(void) { | |
window = window_create(); | |
window_set_click_config_provider(window, click_config_provider); | |
} | |
static void click_config_provider(void *context) { | |
window_single_click_subscribe(BUTTON_ID_SELECT, select_click_handler); | |
} | |
static void select_click_handler(ClickRecognizerRef recognizer, void *context) { |
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
Pebble.addEventListener("appmessage", | |
function (e) { | |
console.log("message"); | |
fetch_random_word(); | |
} | |
); |
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
function fetch_random_word() { | |
var req = new XMLHttpRequest(); | |
req.open('GET', 'http://thesaurus-rex.herokuapp.com/random_word/', true); | |
req.onload = function (e) { | |
var status = req.status; | |
var readyState = req.readyState; | |
console.log("Status: " + status + ", state: " + readyState); | |
if (req.readyState == 4 && req.status == 200) { |