NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Feature] 可以支持client-side only嘛

Open abrasumente233 opened this issue 1 year ago • 3 comments

类似 chatbot-ui,所有api请求直接在浏览器端跟openai通信,不通过host server中转,api key也储存在浏览器,这样就不用担心在host上预填api key,服务器被攻击,或者code太弱导致api key被滥用。

abrasumente233 avatar Apr 22 '23 04:04 abrasumente233

https://nextjs.org/docs/advanced-features/static-html-export

项目暂时不支持,可以导出静态文件,但是没有对接口做兼容,你可以研究下怎么处理。

Yidadaa avatar Apr 22 '23 18:04 Yidadaa

好诶,感谢

abrasumente233 avatar Apr 23 '23 02:04 abrasumente233

不过我最近时间不多,等不及的朋友可以先研究下

abrasumente233 avatar Apr 23 '23 12:04 abrasumente233

怎么用client-side?没看到配置项。

guotao avatar Jun 08 '23 01:06 guotao

现已支持通过 yarn export 构建纯静态产物,可以直接扔到任意静态文件服务器上部署。

Yidadaa avatar Jun 13 '23 16:06 Yidadaa

现已支持通过 yarn export 构建纯静态产物,可以直接扔到任意静态文件服务器上部署。

执行yarn export 后构建的.next文件,要怎么直接部署到nginx?

1158660955 avatar Nov 28 '23 11:11 1158660955

Bot detected the issue body's language is not English, translate it automatically.


It is now supported to build purely static products through yarn export, which can be directly deployed on any static file server.

Should the .next file built after executing yarn export be deployed directly to nginx?

Issues-translate-bot avatar Nov 28 '23 11:11 Issues-translate-bot