|
| 1 | +# How to run the completed project |
| 2 | + |
| 3 | +## Prerequisites |
| 4 | + |
| 5 | +To run the completed project in this folder, you need the following: |
| 6 | + |
| 7 | +- [Visual Studio](https://visualstudio.microsoft.com/vs/) installed on your development machine. If you do not have Visual Studio, visit the previous link for download options. (**Note:** This tutorial was written with Visual Studio 2017 version 15.81. The steps in this guide may work with other versions, but that has not been tested.) |
| 8 | +- Either a personal Microsoft account with a mailbox on Outlook.com, or a Microsoft work or school account. |
| 9 | + |
| 10 | +If you don't have a Microsoft account, there are a couple of options to get a free account: |
| 11 | + |
| 12 | +- You can [sign up for a new personal Microsoft account](https://signup.live.com/signup?wa=wsignin1.0&rpsnv=12&ct=1454618383&rver=6.4.6456.0&wp=MBI_SSL_SHARED&wreply=https://mail.live.com/default.aspx&id=64855&cbcxt=mai&bk=1454618383&uiflavor=web&uaid=b213a65b4fdc484382b6622b3ecaa547&mkt=E-US&lc=1033&lic=1). |
| 13 | +- You can [sign up for the Office 365 Developer Program](https://developer.microsoft.com/office/dev-program) to get a free Office 365 subscription. |
| 14 | + |
| 15 | +## Register a web application with the Application Registration Portal |
| 16 | + |
| 17 | +1. Open a browser and navigate to the [Application Registration Portal](https://apps.dev.microsoft.com). Login using a **personal account** (aka: Microsoft Account) or **Work or School Account**. |
| 18 | + |
| 19 | +1. Select **Add an app** at the top of the page. |
| 20 | + |
| 21 | + > **Note:** If you see more than one **Add an app** button on the page, select the one that corresponds to the **Converged apps** list. |
| 22 | +
|
| 23 | +1. On the **Register your application** page, set the **Application Name** to **React Graph Tutorial** and select **Create**. |
| 24 | + |
| 25 | +  |
| 26 | + |
| 27 | +1. On the **React Graph Tutorial Registration** page, under the **Properties** section, copy the **Application Id** as you will need it later. |
| 28 | + |
| 29 | +  |
| 30 | + |
| 31 | +1. Scroll down to the **Platforms** section. |
| 32 | + |
| 33 | + 1. Select **Add Platform**. |
| 34 | + 1. In the **Add Platform** dialog, select **Web**. |
| 35 | + |
| 36 | +  |
| 37 | + |
| 38 | + 1. In the **Web** platform box, enter `http://localhost:3000` for the **Redirect URLs**. |
| 39 | + |
| 40 | +  |
| 41 | + |
| 42 | +1. Scroll to the bottom of the page and select **Save**. |
| 43 | + |
| 44 | +## Configure the sample |
| 45 | + |
| 46 | +1. Rename the `./graph-tutorial/src/Config.js.example` file to `./graph-tutorial/src/Config.js`. |
| 47 | +1. Edit the `./graph-tutorial/src/Config.js` file and make the following changes. |
| 48 | + 1. Replace `YOUR_APP_ID_HERE` with the **Application Id** you got from the App Registration Portal. |
| 49 | +1. In your command-line interface (CLI), navigate to the `graph-tutorial` directory and run the following command to install requirements. |
| 50 | + |
| 51 | + ```Shell |
| 52 | + npm install |
| 53 | + ``` |
| 54 | + |
| 55 | +## Run the sample |
| 56 | + |
| 57 | +1. Run the following command in your CLI to start the application. |
| 58 | + |
| 59 | + ```Shell |
| 60 | + npm start |
| 61 | + ``` |
| 62 | + |
| 63 | +1. Open a browser and browse to `http://localhost:3000`. |
0 commit comments