Skip to content
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

服务器端怎么部署 #14

Open
ghost opened this issue Sep 4, 2018 · 5 comments
Open

服务器端怎么部署 #14

ghost opened this issue Sep 4, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 4, 2018

server文件夹下面的文件里面还有引用src源码的组件,要上线,服务端怎么部署呢?

@ghost
Copy link
Author

ghost commented Sep 5, 2018

就是我现在能在开发环境上跑,而且我看到你server文件夹下面的文件有引用src目录下面的文件,线上部署的时候不会部署src目录嘛,现在我就不知道怎么把server部分部署到线上服务器里面

@yangfan0095
Copy link
Owner

这个目录是要部署的,因为同构的时候要根据url去映射当前的组件集合 ,SPA渲染时 ,如果是F5刷新,则根据服务映射出的结果 传递到浏览器直接渲染。 我明白你的意思, 但是难点不在于是否要在服务端部署一套src目录 ,而是在于制定合理的缓存方案,减少服务端的压力。 我这个项目重点实在探讨 ssr的实现原理,及通用方法,落定到线上 对性能要求比较高 ,建议你可以参考一下beidou的 缓存方案

@yangfan0095
Copy link
Owner

或者你可以想办法 ,看服务端如何使用打包文件去建立与url的映射关系。

@yangfan0095
Copy link
Owner

@singlekkai

@ghost
Copy link
Author

ghost commented Sep 5, 2018

明白了,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant