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
var DashboardModule = (function () { | |
var privateVar = 'this is private var'; | |
return { | |
init: function () { | |
// some init functionalities | |
}, | |
bindHandlers: function () { |
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'; | |
const DEF_CURRENCY = 'USD'; | |
const DEF_SCALE_FACTOR = 100; | |
const mongoose = require('mongoose'); | |
const Schema = mongoose.Schema; | |
const ObjectId = Schema.ObjectId; | |
const MoneySchema = new Schema({ |
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'; | |
// Get process environment or set default environment to development | |
const ENV = process.env.NODE_ENV || 'development'; | |
const http = require('http'); | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const crypto = require('crypto'); | |
const config = require('./config'); |
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
// Get process environment or set default environment to development | |
const ENV = process.env.NODE_ENV || 'development'; | |
const http = require('http'); | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const app = express(); | |
let server; | |
app.set('root', __dirname); |
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
# reading | |
http://eloquentjavascript.net/ | |
https://www.codecademy.com/glossary/javascript | |
https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript | |
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide | |
http://www.w3schools.com/js/default.asp | |
# interactive | |
https://www.codecademy.com/tracks/javascript |
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
var httpProxy = require('http-proxy'); | |
var fs = require('fs'); | |
var options = { | |
router : { | |
'localhost/api': '127.0.0.1:3030/api', | |
//default route | |
'localhost/.*': '127.0.0.1:3031' | |
} | |
}; | |
var router = new httpProxy.RoutingProxy(options); |
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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Text; | |
public enum HttpVerb | |
{ | |
GET, | |
POST, | |
PUT, |
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
var flatiron = require('flatiron') | |
, app = module.exports = flatiron.app | |
, union = require('union') | |
, connect = require('connect') | |
, passport = require('passport') | |
, LocalStrategy = require('passport-local').Strategy; | |
var Bob = { | |
id : '1234-5678-9012', | |
username : 'bob', |
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
var flatiron = require('flatiron'), | |
resourceful = require('resourceful'), | |
plates = require('plates'), | |
path = require('path'), | |
ecstatic = require('ecstatic'), | |
app = flatiron.app, | |
config, | |
m = {}; |