I really like how the Node.js Configuration submodule creates/updates the nodejs.config.js file my server.js file needs to run properly. However, once I started playing with extensions I no longer could use Node.js Configuration because it overwrote the file and any extensions I had in it. There should be a way for an admin user to put in the paths to js extensions in other modules, without having to write directly to nodejs.config.js file. I will put in an extra field in the node.js config module that will allow for extensions and will write to the file in the proper format when the form is saved.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | nodejs_config-1139384-4396750.patch | 6.75 KB | afeijo |
Comments
Comment #1
afeijothe nodejs_config module is my baby :) let me do it
I can write it tonight, in a few hours
Comment #2
LSU_JBob commentedsure man, go for it. Let me know if you need any help.
Comment #3
Anonymous (not verified) commentednice!
please remember the security context here - we need to be very, very careful about a web frontend writing files that lead to new code loaded into the node.js process.
i'm ok with this in general, but be aware i'm going to reject anything that doesn't allow this to be done securely.
Comment #4
afeijoHere is the patch, I included descriptions for each field, and the 2 new properties to ClientWriteToChannel and ClientWriteToClients
The new textarea field for Extensions will allow the admin to inform 1 extension per line
Comment #5
LSU_JBob commentedThanks afeijo, will review soon.
Comment #6
Anonymous (not verified) commentedi'm getting ready for a beta, so i committed this here:
http://drupalcode.org/project/nodejs.git/commit/be4e669
thanks afeijo!
please reopen if i messed anything up.