5

我正在尝试在代码沙箱中运行json-servernpm。我创建了一个 vanilla 项目并向package.json. 我必须使用json-server --watch db.json.

有没有在代码沙箱中运行脚本的方法?

4

1 回答 1

5

您需要使用像Node这样的容器沙箱才能运行 json-server 并设置您自己的脚本。

以下是有关 CodeSandbox 上可用的不同类型沙箱的更多信息:https ://codesandbox.io/docs/environment

顺便说一句,我们有一个您可能感兴趣的 json-server 模板:https ://codesandbox.io/s/json-server-1i5z0

于 2020-04-20T12:23:06.717 回答