npm - 如何使用 npm start 加载特定页面
问题描述
当我运行npm-start
它时,它会加载,但是它只是加载http://127.0.0.1:8000
.
我想http://127.0.0.1:8000/launch
在运行时加载类似的东西npm start
下面是我的package.json:
{
"name": "myapp",
"version": "0.1.3",
"scripts": {
"serve": "http-server -p 8000 -c-1 .",
"start": "npm run serve",
}
...
}
目前正在加载http://127.0.0.1:8000
这是我想看到的;http://127.0.0.1:8000/launch
解决方案
Solution:
npm install concurrently -g
然后在 package.jason 文件中更新服务
"serve": "concurrently \"http-server -p 8000 -c-1.\" \"start http://127.0.0.1:8000/launch\""
推荐阅读
- python - 如何在python中的多个线程上分担责任
- variables - 覆盖地形变量对象中的属性
- c# - 如何在 .NET Core 中获取 Docker 版本
- kubernetes - 在应用程序和加载顺序中加载多个配置映射
- javascript - Vue:导出功能共享逻辑,模板说它没有导入
- python - np.lexsort 在升序和降序之间切换
- javascript - 使用 javascript 在原始页面上堆叠新元素
- azure - Azure 数据探索标记和存储
- python - 如何在 Kivy 中跨多个屏幕更新 Id 值
- google-chrome - Headless Chrome - chrome-headless-render-pdf 我想在页眉和页脚部分添加图像