I’m out of town this week and have limited access to internet, but I can see lots of good things are happening!
Looking at the new repo for WebUI-NODE, I’m having some trouble understanding the motivation behind the file naming scheme and directory structure. Could you please explain?
Also, I think its a good idea to leave the node_modules folder out of our repo.
The bin/www in it’s a generated file from NodeEclipse Express plugin, I keep it because it serve as single entry point: instead of lunching every Node module you can just run nodejs bin/www and all the node module are started. Plus all the ports used and the “most” of the require are centralized there. I think this is a good thing, but if there is same good practice that I’m missing we can set up the thing.
The philosophy behind the current project foldering is to give it some structure:
view: is supposed to keep GUI files
controllers: is supposed to keep server side module
public/scripts: should contains script that must be imported in the view files
routes: is for express routes modules
that’s all. Hoping this could make the project more understandable.
Any advice will be very appreciated.
Edit:
Yup, node_modules does not need to stand in the repo.
I think we can keep the bin/www (we can rename it) in the repo 'cause it can be used as single entry point.
Edit: @ning-yu for the naming we are still discussing in the volumio 1.6 discussion thread
Yup, node_modules does not need to stand in the repo.
I think we can keep the bin/www (we can rename it) in the repo 'cause it can be used as single entry point.
[/quote]
Yep, think we can keep bin in the repo, as for the modules. I’ll remove them and add to gitignore…
I think we should keep the node_modules (at least when we have them for Armv6). From my experience having them compiled, and stable among releases, avoids lots of problems.
If a module gets updated, and receives a new bug, we may have troubles identifying where the issue is.
Plus, if a module is not released as a binary, we need to compile it each time, installing tons of junk along with gcc and make…
What do you think?
I’m okay with leaving node_modules in the repo if it helps with compatibility. Do you think there’s an alternative way, though, like listing specific module versions in ‘package.json’ so they don’t change?
Yes, that could be an idea!
I’ll paste soon a working image so we can work on the pi for it! And see real world performances (very good indeed, really better than php5-fpm!)