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.

CommentFileSizeAuthor
#4 nodejs_config-1139384-4396750.patch6.75 KBafeijo

Comments

afeijo’s picture

the nodejs_config module is my baby :) let me do it

I can write it tonight, in a few hours

LSU_JBob’s picture

sure man, go for it. Let me know if you need any help.

Anonymous’s picture

nice!

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.

afeijo’s picture

Status: Active » Needs review
StatusFileSize
new6.75 KB

Here 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

LSU_JBob’s picture

Thanks afeijo, will review soon.

Anonymous’s picture

Status: Needs review » Fixed

i'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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit be4e669 on 6.x-1.x, 7.x-1.x, drupalconlondon, auth-refactor, 8.x-1.x, 8.x-1.x-head by beejeebus:
    #1139384 by afeijo: add support for clientsCanWriteToChannels,...