Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the general practice for express and react based application. Keeping the server and client code in same or different projects/folders?

I am from a microsoft background where I always used to keep server and client applications in separate projects.

Now I am writing a client-server application with express as back-end and react js as front-end. Since i am totally a newbie to these two tools, I would like to know..

what is the general practice?:

keeping the express(server) code base and react(client) code base as separate projects? or keeping the server and client code bases together in the same project? I could not think of any pros & cons of either of these approaches.

Your valuable recommendations are welcome!.

PS: please do not mark this question as opinionated.. i believe have a valid reason to ask for recommendations.

like image 446
blogs4t Avatar asked May 31 '17 16:05

blogs4t


1 Answers

I would prefer keeping the server and client as separate projects because that way we can easily manage their dependencies, dev dependencies and unit tests files.

Also if in case we need to move to a different framework for front end at later point we can do that without disturbing the server.

like image 84
Hari Prathap Avatar answered Sep 18 '22 05:09

Hari Prathap