Code example of MDN learning area to get under Windows 10 64
1. Reference URL:https://developer.mozilla.org/zh-CN/docs/learn, as shown in Figure 1
2. Refer to step 4, open the command prompt (Windows) in the computer, refer to the URL:https://www.lifewire.com/how-to-open-command-prompt-2618089, as shown in Figure 2
Open Command Prompt in Windows 10
Tap or click the start button, followed by all apps.
if youRe not using the desktop in Windows 10, tap the all apps button on the bottom-left of your screen instead. ItS the icon that looks like the small list of items.
Tip: The power user menu is a much faster way to get to command prompt in Windows 10 but only if youRe using a keyboard or mouse. Just choice command prompt from the menu that appears on the start button.
Find the Windows system folder from the list of apps and tap or click it.
Under the windows system folder, click or tap command prompt.
Command prompt should open immediate.
You can now execute whatever commands in windows 10 youD like to run.
Open Command Prompt in Windows 10
Tap or click the Start button, then click All Apps.
If you are not using the desktop in Windows 10, click the All Apps button in the lower left corner of the screen. This is an icon that looks like a list of small items.
Tip: The advanced user menu is a shortcut to access command prompts in Windows 10, but only if you are using a keyboard or mouse. Simply select Command Prompt in the menu that appears after pressing Win + X, or right-click the Start button.
Find the Windows system folder from the application list and click or click it.
Under the Windows system folder, click or click Command Prompt.
The command prompt should open immediately.
You can now execute any command you want to run in Windows 10.
3. Select Command Prompt in the menu that appears after pressing Win + X, or click the Start button, as shown in Figure 3
4. Find the Windows system folder from the application list and click or click it. Under the Windows system folder, click or click Command Prompt. as shown in Figure 4
5. Find the Windows PowerShell folder from the application list. It is recommended to use Windows PowerShell, which has more functions, as shown in Figure 5
6. Copy the repo of the learning area to the command prompt in the next folder called learning-area, use the following command, as shown in Figure 6
git clone https://github.com/mdn/learning-area
cd .\learning-area\
git pull
7. Edit the C:\Windows\System32\Drivers\etc\hosts file
# MDN learning-area
127.0.0.1 learning-area.localhost www.learning-area.localhost
8. Added the c:\nginx-1.10.1\conf\vhosts\learning-area.conf file
## WWW ##
server {
listen 80; ## 监听 ipv4 上的 80 端口
# listen [::]:80 default_server ipv6only=on; ## 监听 ipv6 上的 80 端口
root E:/wwwroot/learning-area;
index index.html;
server_name www.learning-area.localhost;
charset utf-8;
autoindex on;
access_log logs/www.learning-area.localhost.access.log;
error_log logs/www.learning-area.localhost.error.log;
# location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {
# access_log off;
# expires max;
# }
client_max_body_size 128M;
# There is a VirtualBox bug related to sendfile that can lead to
# corrupted files, if not turned-off
# sendfile off;
location ~ /\.(ht|svn|git) {
deny all;
}
}
## MISC ##
### WWW Redirect ###
server {
listen 80; ## 监听 ipv4 上的 80 端口
# listen [::]:80 default_server ipv6only=on; ## 监听 ipv6 上的 80 端口
server_name learning-area.localhost;
return 301 http://www.learning-area.localhost$request_uri;
}
9. Reload nginx and execute the command, as shown in Figure 7
.\nginx -s reload
10. Open the URL:http://www.learning-area.localhost/, here you will see the contents of the listed directories, as shown in Figure 8







