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 app = function (request, response) { | |
'use strict'; | |
response.write('test'); | |
request.pipe(response); | |
}; | |
module.exports = app; |
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 express = require('express'), | |
bodyParser = require('body-parser'), | |
cookieParser = require('cookie-parser'), | |
favicon = require('serve-favicon'), | |
path = require('path'), | |
logger = require('./../utils/logger'), | |
methodOverride = require('method-override'), | |
morgan = require('morgan'), | |
session = require('express-session'), | |
db = require('./config/db'), |
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
/*globals define*/ | |
(function (global, factory) { | |
'use strict'; | |
if (typeof define === 'function' && define.amd) { | |
define(['exports'], factory); | |
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { |
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) { |
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 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
(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
/*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
<!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 angular $*/ | |
(function () { | |
'use strict'; | |
angular.module('innermind.controllers', []) | |
.controller('MainCtrl', [ | |
'$scope', | |
'$state', | |
'$http', |