ShtukbaseStandard
包文件→ .shtukbase/packages/lenses/actions/serve.mjs

actions/serve.mjs

5 行, 278 B.

文件按包中的原样显示:代码及其注释不做翻译。

  1. // Action `serve [port]`: serves the project folder and the kit's small API on 127.0.0.1 (port: argument,
  2. // then SHTUK_PORT, then 4321).
  3. import { serve } from "./kit.mjs";
  4. const port = Number(process.argv[2] || process.env.SHTUK_PORT || 4321);
  5. process.exit(await serve(port));