-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[discussion] good way to share files among client and server #43
Comments
If we do eject, what would we want to do later? |
well, I also found this :
I'm yet to test the above . Meanwhile, I'm also testing eject and trying out the links you mentioned. |
Awesome! #2 Seems nice and easy, still long path will be necessary thought. It will make some things easier, but all component imports will be very long |
What do you think ? |
Just found this: https://www.npmjs.com/package/clientconfig |
Not sure how it can be used with react app . what do you have in mind ?
…On 06/10/2017 3:05 pm, "Jakob Krantz" ***@***.***> wrote:
Just found this: https://www.npmjs.com/package/clientconfig
Looks like exactly what we want?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGdNPnR0DpOxlyN7NqtZECUSfiPIzge2ks5spfRQgaJpZM4Put37>
.
|
I didn't think of any problem because of react app. Server side it just sends the config as a cookie, which can be retrieved client side. Maybe I miss something, couldn't it just be required in react as usual? |
I'll give it a test to have config as a cookie, otherwise we'll go with your proposal 2 or 3 :) |
Sorry I got a little busy. Yeah, go for it . would be great if that works :)
…On 06/10/2017 10:50 pm, "Jakob Krantz" ***@***.***> wrote:
I'll give it a test to have config as a cookie, otherwise we'll go with
your proposal 2 or 3 :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGdNPi6SomR7NX2y_HoyI1LRrVCu_QYTks5spmFLgaJpZM4Put37>
.
|
Couldn't get clientconfig to work server side, since react-create-app uses webpack proxy. Didn't manage to send the cookie. |
hey, so what's the next step ? |
As I undertsand with .env the imports client side will need to be |
Hey, I tried
Turns out it CRA guys dont' allow any other files outside of the Have a look and let me know if I missed something. :) |
Okey, thanks for looking into it. Maybe we can just move them into source? |
Or there is probably a correct way to have pictures. Like some kind of asset folder. Could look up how it should be done in create react app. |
we currently share the config file among client and server by mirroring it. This won't scale when more files need to shared and there would be lots of moving parts. Need to find a clean way to keep things simple.
need more opinions.
The text was updated successfully, but these errors were encountered: