To install Express, type the command:
$npm install express body-parser --save
The package express is to create the web server,
The package body-parser is to parse the data passed in the request body.
Add code into index.js
2. Deploy myapp on Azure
At first, we need to create a new Web App Service
2.1 Create a new Web App
Click App Services
Click Add
In resource Group, select the default EsSCRaPRg
Type the Web App name you want
Select the runtime stack.
In our case, we selected Node 10 LTS
Choose the operating System.
In our case, we choose Linux
Select the Region
In our case, we selected Central Canada
As a research I would like to document how to create the web server for Death Notification and how to deploy it on Azure.
1. Create a Web Server for Death Notification
We suppose:
are installed in your computer.
and have an account on Azure.
On Windows, type:
>bash
$mkdir myapp
$cd myapp
$npm init
type RETURN for all options$touch index.js
To install Express, type the command:
$npm install express body-parser --save
The package express is to create the web server, The package body-parser is to parse the data passed in the request body.Add code into index.js
2. Deploy myapp on Azure
At first, we need to create a new Web App Service
2.1 Create a new Web App
Click App Services
Click Add
In resource Group, select the default EsSCRaPRg
Type the Web App name you want
Select the runtime stack. In our case, we selected Node 10 LTS
Choose the operating System. In our case, we choose Linux
Select the Region In our case, we selected Central Canada
Click Review + create
2.2 Deploy myapp on Azure
You need Azure App Service Extension.
And click install.
To deploy myapp on your Web App service, click Azure (Ctrl+Shift+A)
Select your Web App Service under where you want to deploy.
Click the Blue Arrow to Deploy the Web App.
Select the folder myapp to zip and deploy
Click Deploy
Click Browse Website to see actually the website.
Click Open
That's all!
Get myapp Source Code.