Whenever I uncomment the lines on author.js
I get the following error:
/Users/xicombd/Code/taskq/taskq-api/node_modules/graphql/jsutils/invariant.js:20
throw new Error(message);
^
import {types, getType} from 'mobx-state-tree'; | |
function getValueFromPath(value, valuePath) { | |
if (valuePath) { | |
const path = valuePath.split('.'); | |
let endValue = value; | |
for (const pathItem of path) { | |
endValue = endValue[pathItem]; | |
} | |
return endValue; |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/test'); | |
var db = mongoose.connection; | |
db.on('error', function() { | |
return console.error.bind(console, 'connection error: '); | |
}); | |
Secure sessions are easy, but not very well documented. | |
Here's a recipe for secure sessions in Node.js when NginX is used as an SSL proxy: | |
The desired configuration for using NginX as an SSL proxy is to offload SSL processing | |
and to put a hardened web server in front of your Node.js application, like: | |
[NODE.JS APP] <- HTTP -> [NginX] <- HTTPS -> [PUBLIC INTERNET] <-> [CLIENT] | |
Edit for express 4.X and >: Express no longer uses Connect as its middleware framework, it implements its own now. |