xinyu391
V2EX  ›  Svelte

SvelteKite 的 Server-only modules 的疑问

  •  
  •   xinyu391 · Jul 21, 2023 · 1726 views
    This topic created in 1046 days ago, the information mentioned may be changed or developed.

    没做过前端开放,初学 svelte 。 SvelteKit 项目中创建的 +server.js ,按文档来说是运行在 server 端的。 那么这是 js 代码,非 node 环境 server 上怎么运行 js 呢? 比如我把我的 svelte 项目 build 输出静态站点文件,运行在 Gin ( go 的 web 框架库)中。 是不是不能包含 server 模块?(但导出时好像也没报错)

    1 replies    2023-07-21 17:22:56 +08:00
    northess
        1
    northess  
       Jul 21, 2023
    适配器看一下用的什么?
    https://kit.svelte.dev/docs/adapters
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3027 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 15:00 · PVG 23:00 · LAX 08:00 · JFK 11:00
    ♥ Do have faith in what you're doing.