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
$ ssh -i /path/to/keypair.pem [email protected] sudo restart paas | |
paas start/running, process 8857 |
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
$ ssh -i /path/to/keypair.pem [email protected] tail -f /var/log/paas.log | |
Starting app from https://github.com/eladb/mylittlepaas | |
16:01:59 - TRACE - done | |
My little PaaS started on port 80 |
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
$ curl http://ec2-11-111-11-111.eu-west-1.compute.amazonaws.com | |
Hello, little PaaS |
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
$ git add app.js package.json | |
$ git commit -m 'Hello world' | |
[master d8e0ac5] Hello world | |
2 files changed, 29 insertions(+), 0 deletions(-) | |
create mode 100644 app.js | |
create mode 100644 package.json | |
$ git push origin master | |
Counting objects: 4, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (3/3), done. |
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
var http = require('http'); | |
http.createServer(function(req, res) { | |
if (req.url === '/mysupersecretdeploymentendpoint' && req.method === 'POST') { | |
console.log('Post-receive trigger. Exiting in 1 second'); | |
setTimeout(function() { process.exit(1); }, 1000); | |
return res.end(); | |
} | |
res.end('Hello, little PaaS (v2)\n'); |
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
var http = require('http'); | |
http.createServer(function(req, res) { | |
res.end('Hello, little PaaS\n'); | |
}).listen(process.env.port || 5000); | |
console.log('My little PaaS started on port', process.env.port || 5000); |
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
require('child_process').spawn(process.execPath, ['grandchild']); | |
// exit after 500ms | |
setTimeout(function() { process.exit(1); }, 500); |
NewerOlder