NodeJS 如何运行Angular Server?

yiytaume  于 2023-08-04  发布在  Node.js
关注(0)|答案(3)|浏览(127)

下面是我在package.json中的代码

"scripts": {
    "ng": "ng",
    "start": "ng serve --port 8080",
    "build": "ng build --prod --aot",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
}

字符串
我正在尝试运行npm run start,编译成功,但端口未运行。为了构建FE,我使用了npm run build,它工作得很好。所以请指导我如何运行angular服务器

gorkyyrv

gorkyyrv1#

运行此命令:

ng serve --open

字符串

hof1towb

hof1towb2#

在终端中运行以下命令:

ng serve

字符串

jjjwad0x

jjjwad0x3#

“start”:“ng serve”,“start:prod”:“ng serve --configuration=production”,“start:wp”:“ng serve --configuration=production-wp”,

相关问题