Answer the question
In order to leave comments, you need to log in
How to organize the correct directory structure in a Symfony2, NodeJS, AngularJS project?
Hello. Actually the question is how to properly organize the directory tree on a project that uses Symfony2, NodeJS, AngularJS? Folders such as server.js come to mind - for the node, server - put Symfony there, app - all assets with angular there. The project is not corporate, but for myself.
Answer the question
In order to leave comments, you need to log in
if the node is used as a server (for example, for a chat), I would generally recommend doing it as 2 separate projects, because in such cases they are relatively independent and communicate with each other through an intermediate host.
if node is used to load npm modules/libraries (and/or to build gulp/webpack) then it is possible to the root of the project's symphony. for the convenience of work - went to the root of the project and run node commands, just like symphony
I think we should use the structure that symfony gives
app/: This folder contains the application's configuration;
src/: All PHP code is stored here;
web/: This folder must be the web root directory.
then at the same level create a serverjs folder or whatever you prefer to call it
and put angular in the web folder
а зачем мешать в один каталог php и node.js? тем более node.js може заменить php во всех аспектах.
Когда вы устанавливаете Symfony2 или Express на NodeJS, то получаете сразу готовое дерево каталогов, используйте его, оно отлично себя зарекомендовало.
А AngularJS ложыте в папку с публичными скриптами.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question