How to deploy and run passport express node on azure

Viewed 119

I am creating express node service for SSO using passport oauth2 strategy. Below is my express node application code structure.

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)

Below is my 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"
    }
}

Now if i run command "node index.js" or "npm run server" it starts my local with "https://localhost:8070"

same i wants to deploy it on Azure containerized server and wants to start server.

Please help me to understand how to deploy it on azure and start the server similar to above my localhost.

1 Answers
Related