Skip to content

Commit 6949e67

Browse files
author
John Stallo
committed
Testing from a mobile device
1 parent 90a04fe commit 6949e67

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

connected-environment/get-started-nodejs-03.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,27 @@ Connected Environment isn't just about getting code running in Kubernetes - it's
2525

2626
What happened? Edits to content files, like HTML and CSS, don't require the Node.js process to restart, so an active `vsce up` command will automatically sync any modified content files directly into the running container in Azure, thereby providing a fast way to see your content edits.
2727

28+
### Test from a mobile device
29+
If you open up the web app on a mobile device, you will notice that the UI is not scaled appropriately for a small device.
30+
31+
To fix this, we'll add a `viewport` meta tag:
32+
1. Open the file `./public/index.html`
33+
1. Add a `viewport` meta tag in the existing `header` tag:
34+
35+
```html
36+
<header>
37+
<!-- Add this line in the existing header tag -->
38+
<meta name="viewport" content="width=device-width, initial-scale=1">
39+
</header>
40+
```
41+
42+
1. Save the file.
43+
1. Refresh your device's browser.
44+
45+
You should now see the web app rendered correctly.
46+
47+
This is an example of how some problems just aren't found until you test on the devices an app is meant to be used. With VS Connected Environment you can rapidly iterate on your code and validate any changes.
48+
2849
## Update a code file
2950
Updating server-side code files requires a little more work, because a Node.js app needs to restart.
3051

0 commit comments

Comments
 (0)