Hello,
We use Freshdesk with a custom application. It work with both client and serverless part . Client and sever have code in common. We want to mutualize it in a same directory.
Actually we have the following file structure:
|FdProject
|-- App
| |-- js
**| |-- common **
**| |-- somelib.js **
**| |-- someotherlib.js**
| |-- css
| |-- templates
| |-- …
| |-- app.js
|-- Server
| |-- lib
**| |-- common **
**| |-- somelib.js **
**| |-- someotherlib.js**
| |-- …
| |-- server.js
And we want:
|-- App
| |-- js
| |-- css
| |-- templates
| |-- …
| |-- app.js
|-- Server
| |-- lib
| |-- …
| |-- server.js
**|-- common # <-- move common directory one level up **
**| |-- somelib.js **
**| |-- someotherlib.js**
This common directory must exists once in source, and should be set up in application and in server part on packing time.
What is the best practice to make a common source directory, having common code between app and server without any code replication ?
Thank for your help.