- AMP:Building Accelerated Mobile Pages
- Ruadhan O'Donoghue
- 220字
- 2021-07-08 10:03:56
Preparing your web server environment
Time to roll up our sleeves and get our hands dirty with some code. First we'll need to set up a web server. Since AMP is built on standard web technologies--HTML, JavaScript, and CSS--there are no special hosting requirements. To run the examples in this book, you'll need to host the example files on a web server such as Apache, NGINX or NodeJS; any web server will do. We won't go into how to set up a web server in this book, but you should have a basic understanding of working with the web server of your choice. In particular:
- You should be able to deploy HTML files to the correct location on the server
- In some cases AMP requires files to be served from an alternative domain or subdomain, so you should have a way to achieve this, whether it's via a virtual host or domain alias on the same server, or hosted on another server altogether
- Unless you are working on the localhost domain, AMP requires HTTPS in some cases, so it's a good idea to have this set up too
Alternatively, if you just want to follow along without hosting the files yourself, the examples are all hosted on theampbook.com. The source code is also available on github at github.com/ruborg/amp.
推薦閱讀
- WildFly:New Features
- Learning C# by Developing Games with Unity 2020
- Redis入門指南(第3版)
- 從學(xué)徒到高手:汽車電路識(shí)圖、故障檢測(cè)與維修技能全圖解
- Redis Essentials
- Serverless架構(gòu)
- Terraform:多云、混合云環(huán)境下實(shí)現(xiàn)基礎(chǔ)設(shè)施即代碼(第2版)
- Creating Mobile Apps with jQuery Mobile(Second Edition)
- 動(dòng)手學(xué)數(shù)據(jù)結(jié)構(gòu)與算法
- Getting Started with React Native
- MySQL入門很輕松(微課超值版)
- TMS320LF240x芯片原理、設(shè)計(jì)及應(yīng)用
- Rust游戲開發(fā)實(shí)戰(zhàn)
- Arduino計(jì)算機(jī)視覺編程
- 軟件體系結(jié)構(gòu)