如何在azure上部署和运行passport express节点



我正在使用passport oauth2策略为SSO创建快速节点服务。下面是我的express节点应用程序代码结构。

AUTH
- certs
server.cert
server.key
-index.html
-index.js (creates app as express() https server and validate app.get('/') path using passport)
-package.json (dependecies: body-parser, express, nodemon, passport, passport-oauth2, path)

下面是我的Package.json

{
"name": "node-server",
"version": "1.0.0",
"description": "node server for passport authentication",
"main": "index.js",
"scripts": {
"server": "node index.js -p 3002"
},
"author": "abc",
"license": "ISC",
"dependencies": {
"body-parser": "^1.19.0",
"express": "^4.17.1",
"nodemon": "^2.0.6",
"passport": "^0.4.1",
"passport-oauth2": "^1.5.0",
"path": "^0.12.7"
}
}

现在,如果我运行命令";节点索引.js";或";npm运行服务器";它以";https://localhost:8070">

同样,我想在Azure容器化服务器上部署它,并想启动服务器。

请帮助我了解如何在azure上部署它,并启动类似于我的localhost之上的服务器。

要将node.js应用程序部署到azure,您可以使用web应用程序,请按照以下链接

https://learn.microsoft.com/en-us/azure/app-service/quickstart-nodejs?pivots=platform-linux#部署到azure

部署完成后,在提示中选择Browse Website以查看新部署的web应用程序。

最新更新