如何在apache tomcat服务器9版本中部署模拟json数据api(json-server)和Angular 17应用程序

问题描述 投票:0回答:1

如何在 apache tomcat 9 服务器中部署模拟 json 数据(json-server)Api 以及 Angular 17 应用程序?

  1. 我需要部署 Angular 17 应用程序。 2.并且还运行在我用于凝乳操作的角度应用程序中创建的模拟json数据(json-server) 3.我需要json数据库的地方应该在运行服务器时自动运行。 4.我已经安装了Apache Tomcat服务器,我需要部署上述要求。

我曾尝试在我的 package.json 中给出端点以在脚本中自动运行,但它无法正常工作。

angular tomcat json-server angular17
1个回答
0
投票

例如:- 步骤 1:- 同时 npm install -g 步骤 2:- 添加如下所示,在脚本内开始运行 Angular 应用程序和 json 数据库(添加 url),如下面的脚本所示。 第 3 步:- npm 启动 这将一次自动运行 Angular 应用程序和 json 数据库并将其部署在您的服务器中 (package.json) 文件 “脚本”:{ “ng”:“ng”, “开始”:“同时“ng服务--open”“json-server --watch ./request-from-site-DB.json -p 3200”“json-server --watch ./port-manager-DB。 json -p 3300"", “构建”:“ng构建”, "watch": "ng build --watch --配置开发", “测试”:“NG测试”, }

© www.soinside.com 2019 - 2024. All rights reserved.