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
/*global angular*/ | |
(function () { | |
'use strict'; | |
var dataService = function ($http) { | |
var getData = function () { | |
return $http.get('http://127.0.0.1:8080/data/lists.json'); | |
}; |
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
angular.module('app.services', []) | |
.factory('TasksService', function ($q, $timeout, $http) { | |
var service = Object.create(null); | |
service.getTasks = function () { | |
var deferred = $q.defer(); | |
$http.get('data/lists.json') | |
.then(console.log.bind(console), console.log.bind(console)) |
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
/*global angular $*/ | |
(function () { | |
'use strict'; | |
angular.module('innermind.controllers', []) | |
.controller('IndexCtrl', [ | |
'$scope', | |
'$state', | |
'$http', |
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
/*global angular $*/ | |
(function () { | |
'use strict'; | |
angular.module('innermind.controllers', []) | |
.controller('MainCtrl', [ | |
'$scope', | |
'$state', | |
'$http', |
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> | |
<base href="/"> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> |
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
/*global ReadableStream*/ | |
(function () { | |
'use strict'; | |
var interval; | |
var stream = new ReadableStream({ | |
start: function (controller) { |
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
(function (window) { | |
'use strict'; | |
// Uncomment after getting https server to work on windows or finally have a Linux environment | |
// if ((!location.port || location.port === "8080") && location.protocol !== 'https:') { | |
// location.protocol = 'https:'; | |
// } | |
/*console.log('location protocol: %s', location.protocol); | |
console.log('location port: %s', location.port);*/ |
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'), | |
ecstatic = require("ecstatic"), | |
fileServer = ecstatic({root: "./public"}), | |
config = require('./options'), | |
router = require('./routes'); | |
var normalizePort = function (val) { | |
'use strict'; | |
var _port = parseInt(val, 10); |
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 fs = require('fs'); | |
exports.GET = function (path, respond) { | |
'use strict'; | |
fs.stat(path, function (error, stats) { | |
if (error && error.code === "ENOENT") { | |
respond(404, "File not found"); | |
} else if (error) { | |
respond(500, error.toString()); |
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 normalizePort = require('./../../utils').normalizePort, | |
_defaults = [ | |
/*"NODE_ENV",*/ | |
"HOST", | |
"PORT" | |
]; | |
_defaults.forEach(function (name) { |