to see the site is working. You are now running the Linux version of NodeJS locally on Windows via WSL.
99 |
100 | ### Debug the Node Project with VS Code
101 | 1. While still in the Node+JS profile in Terminal, close the previous running instance of NodeJS if you haven't already. We're now going to start the same project using VS Code.
102 | 2. Navigate to the '`\projects\nodejs-shopping-cart` directory and type `code .` to open the project in VS Code.
103 | 3. This opens VS Code on Windows with a feature to debug the NodeJS project running in WSL.
104 | 4. In VS Code you can run the debugger and use breakpoints. You're using a Windows code editor/debugger for a project running the Linux NodeJS. Pretty cool!
105 |
106 | ## Customize Windows Terminal
107 |
108 | Let's make the Node+JS profile look more like Ubuntu. Using your Node+JS profile, update the properties below in the JSON. As you update your profile, the Terminal will automatically reflect your changes.
109 | 1. Set `"useAcrylic" : false,`
110 | 2. Set `"fontFace" : "Ubuntu Mono",`
111 | 3. Set `"fontSize" : 14,`
112 | 4. Set `"colorScheme" : "One Half Dark",`
113 | 5. Set `"cursorShape" : "filledBox",`
114 | 6. Add `"backgroundImage" : "ms-appdata:///roaming/ubuntu.jpg",`
115 | 7. Add `"backgroundImageOpacity" : 0.8,`
116 | 8. Add `"tabTitle" : "Ubuntu 18.04",`
117 | 9. Add `"suppressApplicationTitle" : true`
118 |
119 | After adding these changes, your profile should look like this:
120 | ```json
121 | {
122 | "guid" : "{c6eaf9f4-56a1-5fdc-b5cf-066e8a4b1e40}",
123 | "acrylicOpacity" : 0.5,
124 | "closeOnExit" : true,
125 | "colorScheme" : "One Half Dark",
126 | "commandline" : "wsl.exe -d Ubuntu-18.04",
127 | "cursorColor" : "#FFFFFF",
128 | "cursorShape" : "filledBox",
129 | "fontFace" : "Ubuntu Mono",
130 | "fontSize" : 14,
131 | "historySize" : 9001,
132 | "icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
133 | "name" : "My Node+JS Profile",
134 | "padding" : "4, 2, 4, 2",
135 | "snapOnInput" : true,
136 | "useAcrylic" : false,
137 | "backgroundImage" : "ms-appdata:///roaming/ubuntu.jpg",
138 | "backgroundImageOpacity" : 0.8,
139 | "tabTitle" : "Ubuntu 18.04",
140 | "suppressApplicationTitle" : true
141 | },
142 | ```
143 |
144 | Documentation for the settings in the profiles.json file can be found here: https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md
145 |
146 | ### Thank you
147 |
148 | Thank you for trying out Windows Terminal and WSL. Complete our [survey](https://aka.ms/js19) to register your completion!
149 |
150 | To learn more, please check out the following resources.
151 | - https://aka.ms/learnwsl
152 | - https://github.com/microsoft/terminal
153 | - https://code.visualstudio.com/docs/remote/wsl
154 |
--------------------------------------------------------------------------------
/2-windows-oss-terminal-wsl/REQUIREMENTS.md:
--------------------------------------------------------------------------------
1 | # REQUIREMENTS
2 |
3 | - Windows Insider build 18917 or higher
4 | - Windows Terminal https://github.com/microsoft/terminal
5 | - git https://git-scm.com/downloads
6 | - VS Code https://github.com/microsoft/vscode
7 | - WSL https://aka.ms/wsl2
8 | - Open optional windows features and select `WSL` and `Virtual Machine Platform`. NOTE: This will require a system reboot
9 | - Ubuntu 18.04 for WSL in the [Microsoft Store](https://www.microsoft.com/en-us/p/ubuntu-1804-lts/9n9tngvndl3q)
10 | - for the lab set the username to "oscon" and password "portland"
11 | - migrate this distro to WSL 2 from a cmd window by runnig `wsl --set-version Ubuntu-18.04 2`
12 | - VS Code Remove Extension for WSL https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl
13 | - NodeJS and NPM: `sudo apt install npm -y`
14 | - In Windows install fonts using Powershell:
15 | - `git clone https://github.com/powerline/fonts.git`
16 | - run `install.ps1 pro*`
17 | - In Ubuntu install the powerline shell:
18 | - `sudo apt install python3 python-pip`
19 | - `pip install powerline-shell`
20 | - In Ubuntu shell install utilities `sudo apt install cmatrix caca-utils htop`
21 |
22 | ### Setup
23 | - From the Ubuntu shell create a projects directory in your HOME (~\projects) and in that directory run `git clone https://github.com/mscraigloewen/nodejs-shopping-cart`
24 |
25 | ### Cleanup
26 | - delete ~\projects\nodejs-shopping-cart\node_modules
27 | - close all running Terminal or Code windows
28 | - delete terminal profile file:
29 | - ```C:\Users\[USERNAME]\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json```
30 |
--------------------------------------------------------------------------------
/2-windows-oss-terminal-wsl/UbuntuMono-R.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/2-windows-oss-terminal-wsl/UbuntuMono-R.ttf
--------------------------------------------------------------------------------
/2-windows-oss-terminal-wsl/cleanupWindowsLab.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | rm -rf ~/projects/nodejs-shopping-cart/node_modules
3 | rm /mnt/c/Users/oscon/AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/RoamingState/profiles.json
4 |
--------------------------------------------------------------------------------
/2-windows-oss-terminal-wsl/nodejsmenudropdown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/2-windows-oss-terminal-wsl/nodejsmenudropdown.png
--------------------------------------------------------------------------------
/2-windows-oss-terminal-wsl/ubuntu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/2-windows-oss-terminal-wsl/ubuntu.jpg
--------------------------------------------------------------------------------
/3-github-actions/README.md:
--------------------------------------------------------------------------------
1 | # Deploying a Node.js Web App using GitHub Actions
2 |
3 | ## Overview
4 |
5 | **GitHub Actions** gives you the flexibility to build an automated software development lifecycle workflow. You can write individual tasks ("Actions") and combine them to create a custom workflow. Workflows are configurable automated processes that you can set up in your repository to build, test, package, release, or deploy any project on GitHub.
6 |
7 | With **GitHub Actions** you can build end-to-end continuous integration (CI) and continuous deployment (CD) capabilities directly in your repository.
8 |
9 | ### What’s covered in this lab
10 |
11 | In this lab, you will:
12 |
13 | 1. Create a web app on Azure using the App Service extension
14 | 1. Create a workflow with GitHub Actions to add CI/CD to your app
15 |
16 | ### Prerequisites
17 |
18 | 1. Your Windows machine should have Node.js LTS and Visual Studio Code.
19 |
20 | 1. You are using a GitHub account and an Azure account made for the purposes of this lab. These have been already logged into from your machine and the account info is saved.
21 |
22 | ### Setting up the GitHub repo
23 |
24 | 1. Navigate to the [example app repository](https://github.com/fiveisprime/Useful-Website).
25 |
26 | 1. Click the "Fork" button in the upper-right hand corner of the repository. From there, click the green "Clone" button and copy the URL.
27 |
28 | 
29 |
30 | ## Create an Azure App Service web app
31 |
32 | Create the App Service web app that you'l deploy to from GitHub.
33 |
34 | 1. Click on the Azure icon in the sidebar.
35 |
36 | 
37 |
38 | 1) Click on the `+` icon to create a new app service under the **VSCode GitHub Universe HOL** subscription.
39 |
40 | 
41 |
42 | 1. Give your webapp a unique name (we recommend calling it **YOUR_NAME-jsinteractive** )
43 |
44 | 1. Select **Linux** as your OS and **Node.js LTS** as your runtime.
45 |
46 | 1. It will take a minute or two to create the app. Once it's done, you'll get a prompt to browse to your new site. Click on "View output" and open the link to your site.
47 |
48 | > Note: If creation of the app is taking a bit longer than you expect, call one of the proctors and we'll switch you to an already created app
49 |
50 | 1. The page you browse to will be the default site you see, since you haven't yet deployed anything to the site.
51 |
52 | 
53 |
54 | ## Set up CI/CD with GitHub Actions
55 |
56 | Use GitHub actions to automate the deployment workflow for this web app.
57 |
58 | 1. Inside the App Service extension, right click on the name of your app service and choose "Open in Portal".
59 |
60 | 
61 |
62 | 1. From the Overview page, click on "Get publish profile". A publish profile is a kind of deployment credential, useful when you don't own the Azure subscription.
63 |
64 | 
65 |
66 | 1. Open the settings file you just downloaded in VS Code and copy the contents of the file.
67 |
68 | 1. Add the publish profile as a secret associated with this repo. On the GitHub repository, click on the "Settings" tab.
69 |
70 | 
71 |
72 | 1) Go to "Secrets". Create a new secret and call it "AZURE_WEBAPP_PUBLISH_PROFILE". Paste the contents from the settings file.
73 |
74 | 
75 |
76 | 1. Navigate to the Actions tab in the repo to find the **Deploy Node.js to Azure Web App** template and select "Set up this workflow".
77 |
78 | 
79 |
80 | 1. Update the `env` object, set `AZURE_WEBAPP_NAME` to the name of your app.
81 |
82 |
83 | ```yml
84 | env:
85 | AZURE_WEBAPP_NAME: YOUR_NAME-jsinteractive
86 | ```
87 |
88 | 
89 |
90 | 1. Once you're done, click on "Start commit". Fill in the text box with a commit message, and then click the "Commit change" button, which will trigger the workflow.
91 |
92 | 1. While the Action is being queued, let's get into the details of what this workflow is actually doing. Go to the `.github/workflows/azure.yml` file to follow along.
93 |
94 | - **Workflow Triggers (line 11)**: Your workflow is set up to run on "push" events to the branch
95 |
96 | ```yaml
97 | on:
98 | push:
99 | branches:
100 | - master
101 | ```
102 |
103 | For more information, see [Events that trigger workflows](https://help.github.com/articles/events-that-trigger-workflows).
104 |
105 | - **Running your jobs on hosted runners (line 21):** GitHub Actions provides hosted runners for Linux, Windows, and macOS. We specify the hosted runner in our workflow as below.
106 |
107 | ```yaml
108 | jobs:
109 | build-and-deploy:
110 | name: Build and Deploy
111 | runs-on: ubuntu-latest
112 | ```
113 |
114 | - **Using an action (line 26)**: Actions are reusable units of code that can be built and distributed by anyone on GitHub. To use an action, you must specify the repository that contains the action. We are also specifying the version of Node.js.
115 |
116 | ```yaml
117 | - uses: actions/checkout@master
118 | - name: Use Node.js ${{ env.NODE_VERSION }}
119 | uses: actions/setup-node@v1
120 | with:
121 | node-version: ${{ env.NODE_VERSION }}
122 | ```
123 |
124 | - **Running a command (line 31)**: You can run commands on the job's virtual machine. This action is running the npm commands below to install the dependencies, build the application, and run the tests.
125 |
126 | ```yaml
127 | - name: npm install, build, and test
128 | run: |
129 | # Build and test the project, then
130 | # deploy to Azure Web App.
131 | npm install
132 | npm run build --if-present
133 | npm run test --if-present
134 | ```
135 |
136 | > For workflow syntax for GitHub Actions see [here](https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions)
137 |
138 | 1. You can go back to the Actions tab, click on your workflow, and see that the workflow is queued or being deployed. Wait for the job to complete successfully before going back to your website.
139 |
140 | 
141 |
142 | ## Test out your app!
143 |
144 | 1. Back in VS Code, go to the App Service extension, and right click on your app service and click on "Browse Website" to see your site running.
145 |
146 | 1. Switch back to GitHub to test the GitHub Actions workflow you just made. Edit `views/index.hbs` using the GitHub editor and add the following lines of code on line 11
147 |
148 | ```html
149 |
150 |
Press the button!
151 |
152 | ```
153 |
154 | 
155 |
156 | 1) Go back to the Actions tab and you can watch the build finishing up. Once you see all the green check marks, go to Edge and reload your website!
157 |
--------------------------------------------------------------------------------
/3-github-actions/assets/button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/button.png
--------------------------------------------------------------------------------
/3-github-actions/assets/deploy.yml:
--------------------------------------------------------------------------------
1 | - uses: azure/webapps-deploy@v1
2 | with:
3 | app-name: # Replace with your app name
4 | publish-profile: ${{ secrets.WebApp_PublishProfile }}
5 |
--------------------------------------------------------------------------------
/3-github-actions/assets/images/add-html-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/add-html-code.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/add-yaml-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/add-yaml-file.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/azure-sidebar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/azure-sidebar.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/create-app-service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/create-app-service.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/create-secret.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/create-secret.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/debug-tool-bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/debug-tool-bar.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/fork-github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/fork-github.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/get-publish-profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/get-publish-profile.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/github-settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/github-settings.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/linux-bash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/linux-bash.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/new-action.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/new-action.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/open-in-portal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/open-in-portal.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/python-action.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/python-action.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/python-app-action.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/python-app-action.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/python-default-site.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/python-default-site.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/remote-indicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/remote-indicator.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/reopen-in-container.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/reopen-in-container.png
--------------------------------------------------------------------------------
/3-github-actions/assets/images/workflow-complete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/3-github-actions/assets/images/workflow-complete.png
--------------------------------------------------------------------------------
/4-vso/README.md:
--------------------------------------------------------------------------------
1 | # Using Visual Studio Online
2 |
3 | ## Overview
4 |
5 | Use Visual Studio Online to build, run, and debug a Node.js app from within a browser. In this lab, you'll learn how to create a VS Online environment from an existing GitHub repository and forward a port for local debugging.
6 |
7 | ## 1. Launch Visual Studio Online
8 |
9 | Browse to the [Visual Studio Online](https://online.visualstudio.com/environments). If you're prompted to sign in, contact a proctor to get you signed in.
10 |
11 | ## 2. Create a plan
12 |
13 | A VS Online plan is required to create VS Online environments. In this lab a VS Online plan has been created for you.
14 |
15 | ## 3. Create an Environment
16 |
17 | To create a new cloud-hosted environment in VS Online select the **Create environment** button in the VS Online management portal.
18 |
19 | 
20 |
21 | Complete the form with the following values:
22 |
23 | - **Environment Name**: My Quick Environment
24 | - **Git Repository**: microsoft/vsonline-quickstart
25 | - **Put environment to sleep after...**: 30 minutes
26 | - **Instance Type**: Standard Environment (Linux)
27 |
28 | 
29 |
30 | A card with the name **My Quick Environment** will appear in the management portal with a status badge of **Creating**.
31 |
32 | ## 4. Connect To and Use the Environment
33 |
34 | Once the green **Available** status badge appears on the environment card, click **My Quick Environment** to connect.
35 |
36 | Once connected, open **Readme.md** from **File Explorer**, and then press [`ctrl`]+[`shift`]+[`V`] to render the markdown file.
37 |
38 | Follow the instructions in **Readme.md** to complete the lab.
39 |
--------------------------------------------------------------------------------
/4-vso/create-env-vso-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/4-vso/create-env-vso-01.png
--------------------------------------------------------------------------------
/4-vso/create-plan-vso-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/4-vso/create-plan-vso-01.png
--------------------------------------------------------------------------------
/4-vso/create-quickstart-vso-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/azure-javascript-labs/fd8378b45a19d707367d37c8489ad5fe1ccbfd90/4-vso/create-quickstart-vso-02.png
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Microsoft Open Source Code of Conduct
2 |
3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4 |
5 | Resources:
6 |
7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
10 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_type: sample
3 | languages:
4 | - javascript
5 | - nodejs
6 | products:
7 | - azure
8 | description: "A collection of labs demonstrating how to build Node+JS applications with Azure, Visual Studio Code and the Windows Subsystem for Linux (WSL)."
9 | urlFragment: "azure-javascript-labs"
10 | ---
11 |
12 | # Azure JavaScript Labs
13 |
14 | A collection of labs demonstrating how to build Node and JavaScript applications with Azure, Visual Studio Code and the Windows Subsystem for Linux (WSL).
15 |
16 |
23 |
24 | ## Use Azure Functions to build a RESTful API
25 |
26 | Create an Azure Functions serverless API that returns a list of pets to be adopted. In this lab, you will learn how to create a basic REST API using Node.js Azure Functions and add dependencies from npm.
27 |
28 | [Go to lab](1-vscode-serverless/README.md)
29 |
30 | ## Windows for Node.js Developers
31 |
32 | Setup and customize a Windows PC for Open Source development using the Windows Terminal and Windows Subsystem for Linux (WSL). At the end of this lab you'll use VS Code to debug a Node.js project running in WSL.
33 |
34 | [Go to lab](2-windows-oss-terminal-wsl/README.md)
35 |
36 | ## Deploying a Node.js app with GitHub Actions
37 |
38 | Create a web app in the Azure Cloud using the App Service extension in VS Code then configure a GitHub Actions workflow to add CI/CD to your app and get it deployed. In this lab you'll learn how to build, test, and deploy your app to Azure from your GitHub repository.
39 |
40 | [Go to lab](3-github-actions)
41 |
42 | ## Use Visual Studio Online
43 |
44 | Use Visual Studio Online to build, run, and debug a Node.js app from within a browser. In this lab, you'll learn how to create a VS Online environment from an existing GitHub repository and forward a port for local debugging.
45 |
46 | [Go to lab](4-vso)
47 |
48 | ### Contributing
49 |
50 | This project welcomes contributions and suggestions. Most contributions require you to agree to a
51 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
52 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
53 |
54 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide
55 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
56 | provided by the bot. You will only need to do this once across all repos using our CLA.
57 |
58 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
59 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
60 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
61 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Security
4 |
5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6 |
7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below.
8 |
9 | ## Reporting Security Issues
10 |
11 | **Please do not report security vulnerabilities through public GitHub issues.**
12 |
13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
14 |
15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
16 |
17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18 |
19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20 |
21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 | * Full paths of source file(s) related to the manifestation of the issue
23 | * The location of the affected source code (tag/branch/commit or direct URL)
24 | * Any special configuration required to reproduce the issue
25 | * Step-by-step instructions to reproduce the issue
26 | * Proof-of-concept or exploit code (if possible)
27 | * Impact of the issue, including how an attacker might exploit the issue
28 |
29 | This information will help us triage your report more quickly.
30 |
31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
32 |
33 | ## Preferred Languages
34 |
35 | We prefer all communications to be in English.
36 |
37 | ## Policy
38 |
39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
40 |
41 |
42 |
--------------------------------------------------------------------------------