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
<!DOCTYPE html> | |
<html lang="en" ng-app="app"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>simple-mean</title> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.7/angular.js"></script> | |
<script src="/scripts/app.js"></script> | |
</head> | |
<body> | |
<div ng-controller="TodoCtrl"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>simple-mean</title> | |
</head> | |
<body> | |
It works! | |
</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
'use strict'; | |
let express = require('express'); | |
let app = express(); | |
app.get('/', function (req, res) { | |
// render out the angular bootstrap page | |
res.render('index.html.ejs'); | |
}); |
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
'use strict'; | |
let express = require('express'); | |
let app = express(); | |
app.get('/statuscheck', function (req, res) { | |
res.json({status: 'success'}); | |
}); | |
app.listen(process.env.PORT || 3000); |
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
app.get('/user/:id', function* (id) { | |
let user = yield db.get(id); | |
res.json(user); | |
}); |
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
yield new Promise(function (resolve, reject) { | |
inquirer.prompt( questions, function ( answers ) { | |
if (answers.pipeline) resolve(answers.pipeline); | |
else reject('Must pick a pipeline'); | |
}); | |
}); |
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
'use strict'; | |
let http = require('http'); | |
let https = require('https'); | |
let parseUrl = require('url').parse; | |
function concat (stream, callback) { | |
var strings = []; | |
stream.on('data', function (data) { | |
strings.push(data); |
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
let p = heroku.apps().list() | |
.then(function (apps) { | |
return heroku.apps(apps[0].name).configVars().info(); | |
}); | |
cli.action("working", p); |
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
require 'multi_json' | |
MultiJson.load("{ | |
\"config_vars\": [ | |
\"DATABASE_URL\" | |
], | |
\"created_at\": \"2015-05-15T20: 56: 57Z\", | |
\"id\": \"b84428f9-06cd-4a92-b238-9081afa27344\", | |
\"name\": \"walking-purposefully-7680\", | |
\"addon_service\": { | |
\"id\": \"6c67493d-8fc2-4cd4-9161-4f1ec11cbe69\", |
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
if _, err := os.Stat(filename); os.IsNotExist(err) { | |
fmt.Printf("no such file or directory: %s", filename) | |
return | |
} |