- 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.
推薦閱讀
- Functional Python Programming
- Learn ECMAScript(Second Edition)
- Visual Basic .NET程序設計(第3版)
- R語言數據分析從入門到精通
- DevOps with Kubernetes
- 深入淺出Electron:原理、工程與實踐
- Practical UX Design
- ASP.NET Core Essentials
- Responsive Web Design with HTML5 and CSS3
- 數據結構(C語言)
- Learning Python Design Patterns
- C語言程序設計
- Web前端測試與集成:Jasmine/Selenium/Protractor/Jenkins的最佳實踐
- Visual Basic語言程序設計上機指導與練習(第3版)
- Learn Linux Quickly