gjritter / nerve Goto Github PK
View Code? Open in Web Editor NEWA microframework for node.js.
License: Other
A microframework for node.js.
License: Other
Error:
TypeError: Object # has no method 'get_or_create_session'
at Server.request_handler (/home/nthalk/.node_libraries/nerve.js:109:22)
at EventEmitter. (/home/nthalk/.me/lib/node/libraries/http.js:411:23)
at ServerSideConnection. (/home/nthalk/.me/lib/node/libraries/http.js:332:12)
at node.js:995:9
TypeError: Object # has no method 'get_or_create_session'
at Server.request_handler (/home/nthalk/.node_libraries/nerve.js:109:22)
at EventEmitter. (/home/nthalk/.me/lib/node/libraries/http.js:411:23)
at ServerSideConnection. (/home/nthalk/.me/lib/node/libraries/http.js:332:12)
at node.js:995:9
Explanation:
It looks like module modification is parent down, not child up. So when you were including http_state and depending on it to modify the parent's http objects, it failed because that operation is no longer supported. See the Node.js section below.
Node.js:
commit b73f61a137841cebac8459203b6be3baa1756980
Author: Felix Geisendörfer [email protected]
Date: Thu Feb 4 22:28:04 2010 +0100
Simplified module system
createModule got removed as it was unnecessary and caused issues by
doing its own cache checks independent of loadModule. Internal modules
are now the only globally cached modules, all other modules are only
cached by inheriting their parent modules cache.
Credits: Module specific cache and a few other diffs by Blaine Cook
http://github.com/blaine/node/commit/431662d25c0db3096deb5f679ca73b1dd6bb8ae
http://romeda.org/blog/2010/01/hot-code-loading-in-nodejs.html
http://thread.gmane.org/gmane.comp.lang.javascript.nodejs/1994
Patch:
commit d578284d8b10ebb41c4ffe19f3b8843914f3208e
Author: Carl Taylor <nthalk@orbital.(none)>
Date: Sat Feb 6 23:36:42 2010 -0800
Updated to work with latest node.js where global imports seem to be isolated. reference: TypeError: Object #<an IncomingMessage> has no method 'get_or_create_session'
diff --git a/lib/http_state.js b/lib/http_state.js
index 1249c76..917fc3e 100644
--- a/lib/http_state.js
+++ b/lib/http_state.js
@@ -49,5 +49,11 @@
}
}
exports[n] = http[n];
(function () {
var sys = require('sys'),
http = require('http'),
http = require('./http_state'),
url = require('url'),
path = require('path'),
posix = require('posix'),
mime = require('./mime');
process.mixin(http.ServerResponse.prototype, {
respond: function (response_data) {
need to have support for redirect something like: redirect("/home")
ReferenceError: e is not defined
at nerve/lib/nerve.js:95:7
at node.js:303:21
at node.js:762:9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.