V
V
vasIvas2015-11-27 13:45:21
JavaScript
vasIvas, 2015-11-27 13:45:21

How to develop client and server at the same time?

When creating an isomorphic application, I encountered the following difficulty.
Files for the client and for the server become common, and when editing a particular file, you need to update the client. I use browser-sync + system.js for this. And from now on, the difficulties...
.jsx are in the /src/ and /src/jsx paths. For the /src/jsx/a.jsx and /src/jsx/b.jsx files, the import links will be relative, and therefore the client will ask for a file along the path example.com/a.js, but naturally it is not there.
Routing can be adjusted if I take out all the bower_components libraries into a separate /public/lib/ but this is no longer development, but torment. Yes, and this still does not help, because for a modular assembly, files at any depth are linked relatively, which means that the request to the server will not be correct.
If you work in such a bundle, how do you get out of the situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Pavlov, 2015-11-27
@dmitry_pavlov

Original article in English about Full Stack with JS - Init.js: A Guide to the Why and How of Full-Stack ... . And here is another translation of Init.js: Why and how to develop with Full-Stack Ja... . Might be interesting to read.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question