Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
add configurable nodejs version
Browse files Browse the repository at this point in the history
  • Loading branch information
jmservera committed Mar 20, 2018
1 parent 2f3cb68 commit 09868da
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 16 deletions.
33 changes: 31 additions & 2 deletions README.md
Expand Up @@ -20,18 +20,47 @@ Or...

**Figure 2** External Repository

Open your site and wait until everything is deployed. It comes with some cool nodes preinstalled:
> This project currently uses a workaround to avoid a small problem caused with `child_process.execFile`: it uses a fake npm.cmd that points to the real one.
## Usage

Wait until everything is deployed before opening the website, during the deployment a script is executed to download this repo and install all the needed modules. If you see this screen just wait about 30 seconds to let the Node-RED app start:

![Not Started Site](./_images/notstarted.png)

**Figure 3** Not Started Site

You can see the live log in the Azure Portal, in the *Log stream* tab:

![Application logs stream](./_images/logstream.png)

**Figure 4** Application logs stream

It comes with some cool nodes preinstalled:

* Dashboard (create an awesome ui and see it in https://yoursite/ui )
* Azure IoT Hub
* Cognitive Services
* Azure Storage (Blobs & Tables)
* DocumentDB
* Azure SQL
* Swagger node

## Securing your deployment

To secure this deployment and add an admin password edit the `settings.js` file.

> This project currently uses a workaround to avoid a small problem caused with `child_process.execFile`: it uses a fake npm.cmd that points to the real one.
## Version History

* v0.0.1
* First test with basic nodes
* v0.0.2
* Deploy to Azure Button
* Add cognitive services
* v0.0.3
* Update Node-Red version to 0.18.4
* v1.0.0
* Update Nodejs to 8.9.4
* Make Nodejs version configurable
* Add Swagger Node

Binary file added _images/logstream.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/notstarted.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 26 additions & 14 deletions webapp.json
Expand Up @@ -54,6 +54,13 @@
"metadata": {
"description": "The branch of the GitHub repository to use."
}
},
"nodeJsVersion":{
"type": "string",
"defaultValue": "8.9.4",
"metadata": {
"description": "Nodejs version, make sure that the App Service supports the version you set here."
}
}
},
"variables": {
Expand Down Expand Up @@ -116,19 +123,36 @@
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]" ],
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"properties": {
"RepoUrl": "[parameters('repoURL')]",
"branch": "[parameters('branch')]",
"IsManualIntegration": true
}
},
{
"name": "appsettings",
"type": "config",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites/', parameters('siteName'))]",
"[concat('Microsoft.Web/Sites/', parameters('siteName'),'/sourcecontrols/web')]"
],
"tags": {
"displayName": "AppSettings"
},
"properties": {
"WEBSITE_NODE_DEFAULT_VERSION": "[parameters('nodeJsVersion')]"
}
},
{
"apiVersion": "2015-08-01",
"name": "logs",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]" ],
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"tags": {
"displayName": "Logs"
},
Expand All @@ -151,18 +175,6 @@
"enabled": false
}
}
},
{
"name": "appsettings",
"type": "config",
"apiVersion": "2016-08-01",
"dependsOn": [
"[concat('Microsoft.Web/Sites/', parameters('siteName'))]"
],
"properties": {
"WEBSITE_NODE_DEFAULT_VERSION": "8.9.4",
"DeploymentVersion":"1.0.0"
}
}
]
}
Expand Down

0 comments on commit 09868da

Please sign in to comment.