Skip to main content

CurateClick

github.com favicon

serve-then

serve-then 是一个 Node.js 工具,用于启动子进程运行静态服务而不阻塞父进程,方便在父进程中进行测试或其他操作。它基于 live-server,提供 Promise API 并自动管理子进程生命周期。

Check out serve-then on CurateClick

• Copy the embed code to showcase this product on your website

• Share on X to spread the word about this amazing tool

项目地址:https://github.com/KID-joker/serve-then项目动力:受启发于[start-server-and-test](https://github.com/bahmutov/start-server-and-test),但 serve-then 不是cli工具。start-server-and-test 需要将测试命令写成字符串衔接到启动命令后,比较难使用。通常测试静态资源需要打开两个控制台,一个运行服务,一个运行测试,而且测试结束要手动关闭服务。serve-then 可以一步到位,让流程更可控。项目特性:1. 基于live-server,所有配置与其相同2. Promise函数,并且返回静态服务URL3. 跟随主进程运行结束而销毁子进程使用方法:tsimport { serve, serveOptions } from 'serve-then'serve(options as serveOptions).then(url => { // serving root at url}).catch(err => {})后续开发:1. 支持cli命令,但会比 start-server-and-test 更灵活。

Latest Weekly Picks

promptbuilder.cc favicon
Weekly Pick

Generate, optimize, test, and manage AI prompts in one place. Turn an idea into a ready-to-use prompt in seconds.

Prompt Builder
freqz.net favicon
Weekly Pick

Your Personal K-Style Vibe Photo Studio

Freqz
webleadr.com favicon
Weekly Pick

Find and contact web design leads and businesses without websites, like local dentists, effortlessly from any location in just a few clicks.

Webleadr

the art of having something to say

pretty-scale.com favicon
Weekly Pick

How Pretty Are You? Let AI Decide.

Pretty Scale
c2story.com favicon
Weekly Pick

Create Illustrated Stories with AI

C2story

Impromptu Speech Topics & Timer

Seedance 2.0: Multimodal AI video creator. Precisely direct characters and cameras to create production-ready, multi-shot cinematic stories in one click.