I love the Node system from my research, I come from a Python & PHP background. I am trying to transition my projects to Node (the projects suitable for Node). I use Ubuntu 16.04 with Nginx, for any system related questions.So here are some possibly dumb questions:Where should a Express/Node app be stored during production? I've seen some do /opt/node/project, I just want to build good practices.Do I need a new port for each ExpressJS app? Then proxy each port to each corresponding domain?I got spoiled with Django's magic, seems alot with Express/Node seems manual. Are there any tricks to quicken development? I've seen a decent sum of packages, but it doesn't seem they necessarily tap into the system like Django.Is sequalize the best option to handle models/database structure? It seems confusing, but I am learning - Django handled models pretty simply.How easy is it to migrate a project to another server? Say if both servers have the latest Node. Could I just directly move the app directory to the secondary server and do an npm start and it would work the same way. (ignoring things such as databases). I ask because some things get installed globally, such as Express. Doesn't express only need installed if you're installing new express apps? EDIT: I assume the dependencies would be auto installed from the resource/app files?Does having a node app always running use memory without being utilized? I run my projects on cheap VPS's, so I am worried if I put too many of some simple projects on Node that aren't visited often on Express for example alot of my memory will be utilized. How does Node handle RAM usage?Since Node is a single threaded system, does that mean each node app is a thread OR a single thread for EVERYTHING on the system that is node related? Are there priorities for this or since it's async does it not matter?Sorry if these questions seem basic/confusing, really trying to learn. Love the system
Submitted June 04, 2017 at 08:52PM by Miles360x
No comments:
Post a Comment