Setting up
Prerequisites
Before starting this tutorial, you'll need the following:
- A basic knowledge of HTML, CSS, and JavaScript
- A browser of your choice that can inspect the JavaScript console
- A text editor of your choice
Set up your development environment
Step 1. Download the code
Download the sample code for the tutorial either as a ZIP file or via git:
git clone https://github.com/googlecodelabs/accelerated-mobile-pages-foundations.git
Unzip the archive file (if necessary) and navigate to the project directory through the command line on your computer:
cd accelerated-mobile-pages-foundations
The project directory contains several example resources files and the starting article.html
page.
Step 2. Run the sample page
To test our sample page we need to access the files from a web server. There are several ways to create a temporary local web server for the purposes of testing. Here are some options, choose the one that works best for you:
After setting up your local web server, access the sample article in your browser at this URL:
http://localhost:8000/article.html