Git Product home page Git Product logo

nerve's People

Contributors

gjritter avatar jankuca avatar morganrallen avatar nikhilm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nerve's Issues

The global http mixin in http_state is invalid with node trunk.


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 @@
}
}

  • // Do cleanup
    setInterval(cleanup_sessions, 1000);
  • // Export the data
  • for(n in http){
  •   exports[n] = http[n];
    
  • }
    }());
    \ No newline at end of file
    diff --git a/lib/nerve.js b/lib/nerve.js
    index a57d5ad..c821890 100644
    --- a/lib/nerve.js
    +++ b/lib/nerve.js
    @@ -3,12 +3,12 @@

(function () {
var sys = require('sys'),

  •   http = require('http'),
    
  •   http = require('./http_state'),
    url = require('url'),
    path = require('path'),
    posix = require('posix'),
    mime = require('./mime');
    
  • require('./http_state');
  • ;

process.mixin(http.ServerResponse.prototype, {
respond: function (response_data) {

redirect support

need to have support for redirect something like: redirect("/home")

e is not defined

ReferenceError: e is not defined
    at nerve/lib/nerve.js:95:7
    at node.js:303:21
    at node.js:762:9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.