【发布时间】:2021-03-21 21:56:30
【问题描述】:
我正在使用护照 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"
}
}
现在,如果我运行命令“node index.js”或“npm run server”,它会以“https://localhost:8070”启动我的本地
同样,我想将它部署在 Azure 容器化服务器上并想启动服务器。
请帮助我了解如何在 azure 上部署它并启动类似于上面我的本地主机的服务器。
【问题讨论】:
标签: javascript node.js azure passport.js passport-local