I hereby claim:
- I am dylants on github.
- I am dylants (https://keybase.io/dylants) on keybase.
- I have a public key whose fingerprint is 3F79 80AC 2F9D 2A4D 5F5F C550 2FC5 45DB 9CF6 6BBF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // -------------------------------------------- | |
| // --------------- app.js ------------------- | |
| // -------------------------------------------- | |
| "use strict"; | |
| var Hapi = require("hapi"), | |
| yaml = require("js-yaml"), | |
| fs = require("fs"); | |
| var config, serverOptions, serverConfiguration, server; | 
| var domain = require("domain").create(); | |
| // ... | |
| // surround the mongo connection in a domain, to handle errors | |
| domain.run(function() { | |
| // connect to the database | |
| mongoose.connect("mongodb://" + mongoConnection, function(error) { | |
| // handle the error case | |
| if (error) { | 
| /* | |
| * package.json | |
| */ | |
| { | |
| "name": "app-name", | |
| "version": "0.1.0", | |
| "scripts": { | |
| "prestart": "git rev-parse HEAD > ./BUILD", | |
| "start": "node app.js" | |
| } | 
| var csv = require("csv"), | |
| fs = require("fs"); | |
| // the job of the parser is to convert a CSV file | |
| // to a list of rows (array of rows) | |
| var parser = csv.parse({ | |
| columns: function(line) { | |
| // By defining this callback, we get handed the | |
| // first line of the spreadsheet. Which we'll | |
| // ignore and effectively skip this line from processing | 
| "use strict"; | |
| var debug = require("debug"); | |
| // enable the "myApp" namespace by default | |
| debug.enable("myApp*"); | |
| // returns the calling filename, but prepended with "myApp:" | |
| function _getDecorator() { | |
| // the code below screws up test output when a test fails, | 
| "use strict"; | |
| var mongoose = require("mongoose"); | |
| var mockMongooseModel = {}; | |
| module.exports = mockMongooseModel; | |
| /** | |
| * This function is useful for tests that require Mongoose models | |
| * loaded prior to loading the test file. This should be called in | 
| const initialState = { | |
| ... | |
| }; | |
| export default function childReducer(state = initialState, action) { | |
| switch (action.type) { | |
| // process the actions as you would normally in any reducer | |
| case CHILD_REDUCER_ACTION: | |
| return Object.assign({}, state, { | |
| ... | 
| /* ProtonMail */ | |
| /* CLASSIC THEME */ | |
| body { font-size: 14px } | |
| body, | |
| .pm_opensans { | |
| font-family: 'Lucida Grande', Verdana, Arial, sans-serif | |
| } | 
| // config/mock/nock.js | |
| import nock from 'nock'; | |
| import config from '../../config'; | |
| // disable all connections so that we use only the mocks | |
| nock.disableNetConnect(); | |
| nock(config.blah.api.rootUrl) |