Created
January 16, 2014 03:01
-
-
Save jefflarkin/8449132 to your computer and use it in GitHub Desktop.
Error I'mm seeing from HAPI hello world example.
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 Hapi = require('hapi'); | |
var server = Hapi.createServer(process.env.IP,parseInt(process.env.PORT)); | |
// Define the route | |
var hello = { | |
handler: function (request) { | |
request.reply({ greeting: 'hello world' }); | |
} | |
}; | |
// Add the route | |
server.route({ | |
method: 'GET', | |
path: '/hello', | |
config: hello | |
}); | |
server.start(function() | |
{ | |
console.log("Server at " + server.info.uri); | |
console.log(server); | |
}); |
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
Server at http://127.2.70.1:8080 | |
{ domain: null, | |
_events: | |
{ log: [Function], | |
request: [Function], | |
response: [Function], | |
tail: [Function], | |
internalError: [Function] }, | |
_maxListeners: 10, | |
settings: | |
{ maxSockets: Infinity, | |
router: { isCaseSensitive: true }, | |
state: { cookies: [Object] }, | |
location: '', | |
payload: { maxBytes: 1048576, uploads: '/tmp/' }, | |
validation: null, | |
json: { replacer: null, space: null }, | |
files: { relativeTo: '.', etagsCacheMaxSize: 10000 }, | |
timeout: { socket: undefined, client: 10000, server: false }, | |
load: | |
{ maxHeapUsedBytes: 0, | |
maxRssBytes: 0, | |
maxEventLoopDelay: 0, | |
sampleInterval: 0 }, | |
debug: { request: [Object] }, | |
labels: [], | |
cache: null, | |
cors: null, | |
views: null }, | |
_unixDomainSocket: false, | |
_windowsNamedPipe: false, | |
_host: '127.2.70.1', | |
_port: 8080, | |
_onConnection: [Function], | |
_started: true, | |
auth: | |
{ server: [Circular], | |
_schemes: {}, | |
_strategies: {}, | |
_defaultStrategy: { name: null, mode: 'required' } }, | |
_router: | |
{ server: [Circular], | |
routes: { get: [Object] }, | |
vhosts: null, | |
notfound: | |
{ settings: [Object], | |
server: [Circular], | |
env: {}, | |
method: 'notfound', | |
_segments: [Object], | |
path: '/{p*}', | |
fingerprint: '/#', | |
params: [Object], | |
prerequisites: null, | |
cycle: [Object] }, | |
badResource: | |
{ settings: [Object], | |
server: [Circular], | |
env: {}, | |
method: 'badresource', | |
_segments: [Object], | |
path: '/{p*}', | |
fingerprint: '/#', | |
params: [Object], | |
prerequisites: null, | |
cycle: [Object] } }, | |
_etags: | |
{ _max: 10000, | |
_lengthCalculator: [Function: naiveLength], | |
_allowStale: false, | |
_maxAge: null, | |
_dispose: undefined, | |
_cache: {}, | |
_lruList: {}, | |
_mru: 0, | |
_lru: 0, | |
_length: 0, | |
_itemCount: 0 }, | |
_eventLoopTimer: null, | |
_loadBench: { ts: 2519575901.567423 }, | |
load: { eventLoopDelay: 0, heapUsed: 0, rss: 0 }, | |
_ext: | |
{ _events: | |
{ onRequest: null, | |
onPreAuth: null, | |
onPostAuth: null, | |
onPreHandler: null, | |
onPostHandler: null, | |
onPreResponse: null }, | |
invoke: [Function] }, | |
_stateDefinitions: {}, | |
_dtrace: { report: [Function] }, | |
pack: | |
{ _settings: {}, | |
_servers: [ [Circular] ], | |
_byLabel: {}, | |
_byId: { '0': [Circular] }, | |
_env: {}, | |
_helpers: {}, | |
_caches: { _default: [Object] }, | |
list: {}, | |
plugins: {}, | |
events: { domain: null, _events: {}, _maxListeners: 10 }, | |
app: {}, | |
hapi: | |
{ Boom: [Object], | |
boom: [Object], | |
Error: [Object], | |
error: [Object], | |
Server: [Object], | |
utils: [Object], | |
types: [Object], | |
Pack: [Function], | |
Composer: [Function], | |
state: [Object], | |
createServer: [Function] }, | |
_ext: { _events: [Object], invoke: [Function] } }, | |
plugins: {}, | |
app: {}, | |
helpers: {}, | |
listener: | |
{ domain: null, | |
_events: | |
{ request: [Function], | |
connection: [Object], | |
clientError: [Function] }, | |
_maxListeners: 10, | |
_connections: 0, | |
connections: [Getter/Setter], | |
_handle: | |
{ fd: 10, | |
writeQueueSize: 0, | |
onconnection: [Function: onconnection], | |
owner: [Circular] }, | |
_usingSlaves: false, | |
_slaves: [], | |
allowHalfOpen: true, | |
httpAllowHalfOpen: false, | |
timeout: 120000, | |
_connectionKey: '4:127.2.70.1:8080' }, | |
info: | |
{ host: '127.2.70.1', | |
port: 8080, | |
protocol: 'http', | |
uri: 'http://127.2.70.1:8080' }, | |
_connections: {} } | |
Debug: hapi, internal, implementation, error | |
TypeError: Uncaught error: Object [object Object] has no method 'reply' | |
at hello.handler (/var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/app.js:7:17) | |
at /var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/node_modules/hapi/lib/handler.js:95:35 | |
at protect (/var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/node_modules/hapi/lib/ext.js:100:9) | |
at /var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/node_modules/hapi/lib/handler.js:92:9 | |
at Function.internals.Ext.runProtected (/var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/node_modules/hapi/lib/ext.js:103:5) | |
at Object.internals.handler (/var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/node_modules/hapi/lib/handler.js:69:9) | |
at exports.execute (/var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/node_modules/hapi/lib/handler.js:31:19) | |
at /var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/node_modules/hapi/lib/request.js:310:13 | |
at iterate (/var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/node_modules/hapi/node_modules/async/lib/async.js:131:13) | |
at /var/lib/stickshift/52d58295500446441c0000b5/app-root/data/738681/node_modules/hapi/node_modules/async/lib/async.js:142:25 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment