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
| '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 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
| '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 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
| '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); |
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
| <!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 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>simple-mean</title> | |
| </head> | |
| <body> | |
| It works! | |
| </body> | |
| </html> |
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
| '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 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
| '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 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
| app.get('/user/:id', function* (id) { | |
| let user = yield db.get(id); | |
| res.json(user); | |
| }); |
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
| 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 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
| '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); |