lundi 22 mai 2017

What is the best way to share configs between backend and frontend?

I have backend built with Express.js and frontend built with Ember.js. In my git repo there are two folders with frontend and backend. I have file with constants on backend but I don't want to duplicate this file in the frontend.

Also, I could make a request from frontend to the backend to get these constants and further work with it from Ember.DS but I don't want a redundant query to API.

I think best way to make module and add it into requirements on backend and on frontend. But for this, I need to create a separate repo and I think it's overhead to use 2 repositories.

Please recommend another good way to solve this problem.




Aucun commentaire:

Enregistrer un commentaire