$ heroku apps
=== My Apps
ancient-headland-3338
angular-boilerplate
cli-build
dickey-xxx
dickeyxxx-simple-mean
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 dns = require('dns'); | |
setInterval(() => { | |
dns.lookup('api.heroku.com', err => { | |
if (err) console.error(`XXXXXXXXXXXXX\nERROR: ${err}\nXXXXXXXXXXXXXXX`); | |
else process.stdout.write('.'); | |
}); | |
}, 200); |
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
// node 6 | |
let msg = "Merge pull request #222 from heroku/api-key-warning-whoami show warning if HEROKU_API_KEY is set" | |
let [, pr, branch, message] = msg.match(/Merge pull request (#\d+) from ([\S]+) (.*)/) | |
// node 5 | |
let msg = "Merge pull request #222 from heroku/api-key-warning-whoami show warning if HEROKU_API_KEY is set" | |
let matches = msg.match(/Merge pull request (#\d+) from ([\S]+) (.*)/) | |
let pr = matches[1] | |
let branch = matches[2] | |
let messages = matches[3] |
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
$ heroku domains --app heroku-npm | |
=== heroku-npm Heroku Domain | |
heroku-npm.herokuapp.com | |
$ heroku domains --app heroku-npm | |
heroku-npm.herokuapp.com |
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 (req, res, next) { | |
db.get(req.params.id, function (err, user) { | |
if (err) return next(err); | |
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
'use strict'; | |
angular.module('app', []); | |
angular.module('app') | |
.controller('TodoCtrl', function ($scope, TodoSvc) { | |
$scope.todos = [{title: 'Get paper'}, {title:'Mail rent check'}]; | |
$scope.refresh = function () { | |
TodoSvc.fetch() |
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 mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/todo'); | |
let Todo = mongoose.model('Todo', {title: String}); | |
let express = require('express'); | |
let app = express(); |
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'; | |
angular.module('app', []); | |
angular.module('app') | |
.controller('TodoCtrl', function ($scope, TodoSvc) { | |
$scope.todos = [{title: 'Get paper'}, {title:'Mail rent check'}]; | |
$scope.addTodo = function () { | |
TodoSvc.add($scope.newTodo) |
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'; | |
angular.module('app', []); | |
angular.module('app') | |
.controller('TodoCtrl', function ($scope) { | |
$scope.todos = [{title: 'Get paper'}, {title: 'Mail rent check'}]; | |
$scope.addTodo = function () { | |
$scope.todos.push($scope.newTodo); |