Node General Rules js

I read some tutorials on node, but there are some best / general practices that I would like to ask about those who have already created real node applications.

  • Who are you launching the node application like on your Linux box? None of the tutorials I read mention anything about adding a user and a node group, so I wonder if that is the case, because they just neglect to mention it or because they are doing something else.
  • Where do you keep your projects? '/Home/'? '/ Var /?
  • Do you usually put something in front of your node application? For example, nginx or haproxy?
  • Do you run other resources like storage (redis, mongo, mysql, ...), mq, etc. on one computer or on separate machines?
+5
source share
4 answers

I assume this question is mainly related to setting up your online server, not a local computer.

  • On irc, someone answered the same question and said that he was using a separate user for each application. Therefore, I suppose this is a good common practice.

  • I mainly do / home / user / apps

  • I see a lot of nginx examples, so I guess this is what most people use. I have a server with varnish in front of a node.js application that works well and is easy to configure. There are some clean node.js solutions, but for something as important as your reverse proxy, I would go for something that is a bit more tested in battle.

  • , , , . ? ? ? , ?

    , VPS, , VPS, .

    , , . , , , . , .

    , , . , Puppet Chef, -, .

Linux 3 Linux 1,5 . , , , .

+2

:

  • , .

  • /home/user/, , user ( root).

  • - Node JS node -http-proxy module. -, - Node. : , , , nginx HTTP/1.1 ( , ).

  • , . , . . - .

+2
  • /, Apache -.

    Debian, www-data: www-data​​p >

    , . , - Webmin, Node, root (, , adm group) .

  • Debian /var/nodejs ( /var/www "" -, PHP)

  • , Node ( ), IP- . , Node.

    , Node, -, , , IP- . , , .

    , , -, - , - - - - (, https://extdomain/folder β†’ http://localhost:1234), .

  • VPS . . , , , .

-2

All Articles