A
A
Alexander Evgenievich2016-02-04 14:16:43
symfony
Alexander Evgenievich, 2016-02-04 14:16:43

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

3 answer(s)
Y
Yuri, 2016-02-08
@banderos120

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

S
Sergey Zelensky, 2016-02-04
@SergeyZelensky-Rostov

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

A
Alexander Litvinenko, 2016-02-04
@edli007

а зачем мешать в один каталог php и node.js? тем более node.js може заменить php во всех аспектах.
Когда вы устанавливаете Symfony2 или Express на NodeJS, то получаете сразу готовое дерево каталогов, используйте его, оно отлично себя зарекомендовало.
А AngularJS ложыте в папку с публичными скриптами.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question