Create a gist now

Instantly share code, notes, and snippets.

Deployd ctx object inside event
{ url: '/e59f6412949f29b9',
req:
{ _readableState:
{ highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: false,
ended: true,
endEmitted: false,
reading: false,
calledRead: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
objectMode: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: true,
domain:
{ domain: null,
_events: [Object],
_maxListeners: 10,
members: [Object] },
_events: {},
_maxListeners: 10,
socket:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
onend: [Function],
destroyed: false,
bytesRead: 16817,
_bytesDispatched: 647176,
_pendingData: null,
_pendingEncoding: '',
server: [Object],
_idleTimeout: 120000,
_idleNext: [Object],
_idlePrev: [Object],
_idleStart: 1423819077561,
_monotonicStartTime: 5570682,
parser: [Object],
ondata: [Function],
_paused: false,
_httpMessage: [Object],
_peername: [Object] },
connection:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
onend: [Function],
destroyed: false,
bytesRead: 16817,
_bytesDispatched: 647176,
_pendingData: null,
_pendingEncoding: '',
server: [Object],
_idleTimeout: 120000,
_idleNext: [Object],
_idlePrev: [Object],
_idleStart: 1423819077561,
_monotonicStartTime: 5570682,
parser: [Object],
ondata: [Function],
_paused: false,
_httpMessage: [Object],
_peername: [Object] },
httpVersion: '1.1',
complete: true,
headers:
{ host: 'localhost:3000',
connection: 'keep-alive',
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36',
'accept-encoding': 'gzip, deflate, sdch',
'accept-language': 'en-US,en;q=0.8,fr-FR;q=0.6,fr;q=0.4',
cookie: '_ga=GA1.1.792379358.1421335328; sid=c8f0da6f71a8a9d5b70ecfc578f0371c0bc741e618884ce1825d259a21dc3cfe373b1d15343795c433a6a8b4de1f313bfa728063b9f9a1119bb671ce0225daac' },
trailers: {},
_pendings: [],
_pendingIndex: 0,
url: '/contacts/e59f6412949f29b9',
method: 'GET',
statusCode: null,
client:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
onend: [Function],
destroyed: false,
bytesRead: 16817,
_bytesDispatched: 647176,
_pendingData: null,
_pendingEncoding: '',
server: [Object],
_idleTimeout: 120000,
_idleNext: [Object],
_idlePrev: [Object],
_idleStart: 1423819077561,
_monotonicStartTime: 5570682,
parser: [Object],
ondata: [Function],
_paused: false,
_httpMessage: [Object],
_peername: [Object] },
_consuming: false,
_dumped: false,
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
next: [Function: next],
baseUrl: '',
originalUrl: '/contacts/e59f6412949f29b9',
_parsedUrl:
{ protocol: null,
slashes: null,
auth: null,
host: null,
port: null,
hostname: null,
hash: null,
search: null,
query: null,
pathname: '/contacts/e59f6412949f29b9',
path: '/contacts/e59f6412949f29b9',
href: '/contacts/e59f6412949f29b9',
_raw: '/contacts/e59f6412949f29b9' },
params: {},
query: { id: 'e59f6412949f29b9' },
res:
{ domain: [Object],
_events: [Object],
_maxListeners: 10,
output: [],
outputEncodings: [],
writable: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: true,
_headerSent: false,
_header: '',
_hasBody: true,
_trailer: '',
finished: false,
_hangupClose: false,
socket: [Object],
connection: [Object],
_headers: [Object],
_headerNames: [Object],
req: [Circular],
locals: {},
cookies: [Object] },
cookies: { request: [Circular], response: [Object] },
session:
{ data: [Object],
sid: 'c8f0da6f71a8a9d5b70ecfc578f0371c0bc741e618884ce1825d259a21dc3cfe373b1d15343795c433a6a8b4de1f313bfa728063b9f9a1119bb671ce0225daac',
store: [Object],
socket: [Object],
emitToUsers: [Function],
emitToAll: [Function],
isRoot: false },
_routed: true },
res:
{ domain:
{ domain: null,
_events: [Object],
_maxListeners: 10,
members: [Object] },
_events: { finish: [Function] },
_maxListeners: 10,
output: [],
outputEncodings: [],
writable: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: true,
_headerSent: false,
_header: '',
_hasBody: true,
_trailer: '',
finished: false,
_hangupClose: false,
socket:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
onend: [Function],
destroyed: false,
bytesRead: 16817,
_bytesDispatched: 647176,
_pendingData: null,
_pendingEncoding: '',
server: [Object],
_idleTimeout: 120000,
_idleNext: [Object],
_idlePrev: [Object],
_idleStart: 1423819077561,
_monotonicStartTime: 5570682,
parser: [Object],
ondata: [Function],
_paused: false,
_httpMessage: [Circular],
_peername: [Object] },
connection:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
onend: [Function],
destroyed: false,
bytesRead: 16817,
_bytesDispatched: 647176,
_pendingData: null,
_pendingEncoding: '',
server: [Object],
_idleTimeout: 120000,
_idleNext: [Object],
_idlePrev: [Object],
_idleStart: 1423819077561,
_monotonicStartTime: 5570682,
parser: [Object],
ondata: [Function],
_paused: false,
_httpMessage: [Circular],
_peername: [Object] },
_headers: { 'x-powered-by': 'Express', 'set-cookie': [Object] },
_headerNames: { 'x-powered-by': 'X-Powered-By', 'set-cookie': 'Set-Cookie' },
req:
{ _readableState: [Object],
readable: true,
domain: [Object],
_events: {},
_maxListeners: 10,
socket: [Object],
connection: [Object],
httpVersion: '1.1',
complete: true,
headers: [Object],
trailers: {},
_pendings: [],
_pendingIndex: 0,
url: '/contacts/e59f6412949f29b9',
method: 'GET',
statusCode: null,
client: [Object],
_consuming: false,
_dumped: false,
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
next: [Function: next],
baseUrl: '',
originalUrl: '/contacts/e59f6412949f29b9',
_parsedUrl: [Object],
params: {},
query: [Object],
res: [Circular],
cookies: [Object],
session: [Object],
_routed: true },
locals: {},
cookies: { request: [Object], response: [Circular] } },
body: undefined,
query: { id: 'e59f6412949f29b9' },
server:
{ domain: null,
_events:
{ connection: [Function: connectionListener],
clientError: [Function],
close: [Function],
upgrade: [Function],
request: [Function],
'request:error': [Function] },
_maxListeners: 10,
_connections: 7,
connections: [Getter/Setter],
_handle:
{ fd: 12,
writeQueueSize: 0,
onconnection: [Function: onconnection],
owner: [Circular] },
_usingSlaves: false,
_slaves: [],
allowHalfOpen: true,
httpAllowHalfOpen: false,
timeout: 120000,
options: { db: [Object], env: 'development' },
stores: {},
db:
{ options: [Object],
connectionString: 'mongodb://localhost:27017/test-app',
Db: [Object] },
sockets:
{ name: '/',
server: [Object],
sockets: [Object],
connected: [Object],
fns: [],
ids: 0,
acks: {},
adapter: [Object],
_events: [Object] },
sessions:
{ sockets: [Object],
socketQueue: [Object],
socketIndex: [Object],
namespace: 'sessions',
_db: [Object] },
keys: { path: '.dpd/keys.json' },
handleRequest: [Function: handleRequest],
route: [Function: route],
createStore: [Function],
_connectionKey: '4:0.0.0.0:3000',
resources: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
router: { resources: [Object], server: [Circular] },
__resourceCache: null },
session:
{ data: { id: 'c8f0da6f71a8a9d5b70ecfc578f0371c0bc741e618884ce1825d259a21dc3cfe373b1d15343795c433a6a8b4de1f313bfa728063b9f9a1119bb671ce0225daac' },
sid: 'c8f0da6f71a8a9d5b70ecfc578f0371c0bc741e618884ce1825d259a21dc3cfe373b1d15343795c433a6a8b4de1f313bfa728063b9f9a1119bb671ce0225daac',
store:
{ sockets: [Object],
socketQueue: [Object],
socketIndex: [Object],
namespace: 'sessions',
_db: [Object] },
socket: { on: [Function], emit: [Function] },
emitToUsers: [Function],
emitToAll: [Function],
isRoot: false },
method: 'GET',
done: [Function],
dpd:
{ contacts:
{ get: [Function],
post: [Function],
put: [Function],
del: [Function],
exec: [Function] },
todos:
{ get: [Function],
post: [Function],
put: [Function],
del: [Function],
exec: [Function] } },
router:
{ resources: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
server:
{ domain: null,
_events: [Object],
_maxListeners: 10,
_connections: 7,
connections: [Getter/Setter],
_handle: [Object],
_usingSlaves: false,
_slaves: [],
allowHalfOpen: true,
httpAllowHalfOpen: false,
timeout: 120000,
options: [Object],
stores: {},
db: [Object],
sockets: [Object],
sessions: [Object],
keys: [Object],
handleRequest: [Function: handleRequest],
route: [Function: route],
createStore: [Function],
_connectionKey: '4:0.0.0.0:3000',
resources: [Object],
router: [Circular],
__resourceCache: null } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment