试图让 "npm run dev" 创建 2 shell 个实例

trying to make "npm run dev" create 2 shell instances

我正在使用 json-server 作为 nuxt 项目的本地服务器,我想自动启动服务器,然后 运行 在另一个 shell 实例上使用该项目“npm 运行 开发”

在 package.json 的脚本标签中,这是我想出的:

    "dev": "json-server --watch db.json --port 3004 & nuxt"

但是这个脚本只启动服务器

尝试concurrently

npm install -g concurrently

"dev": "concurrently \"json-server --watch db.json --port 3004\" \"nuxt""