Skip to content

Commit aaed13e

Browse files
committed
Fixing snippet
1 parent 1595e3a commit aaed13e

2 files changed

Lines changed: 3 additions & 15 deletions

File tree

demo/graph-tutorial/routes/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
// <IndexRouterSnippet>
45
var express = require('express');
56
var router = express.Router();
67

@@ -14,3 +15,4 @@ router.get('/', function(req, res, next) {
1415
});
1516

1617
module.exports = router;
18+
// </IndexRouterSnippet>

tutorial/02-create-app.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,7 @@ In this section you will implement the UI for the app.
9494

9595
1. Open the `./routes/index.js` file and replace the existing code with the following.
9696

97-
```js
98-
var express = require('express');
99-
var router = express.Router();
100-
101-
/* GET home page. */
102-
router.get('/', function(req, res, next) {
103-
let params = {
104-
active: { home: true }
105-
};
106-
107-
res.render('index', params);
108-
});
109-
110-
module.exports = router;
111-
```
97+
:::code language="javascript" source="../demo/graph-tutorial/routes/index.js" id="IndexRouterSnippet" highlight="6-10":::
11298

11399
1. Save all of your changes and restart the server. Now, the app should look very different.
114100

0 commit comments

Comments
 (0)