官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 鞍山市| 天峻县| 荣成市| 江西省| 新巴尔虎左旗| 常宁市| 鄂州市| 武乡县| 中西区| 太湖县| 永福县| 凉山| 东平县| 崇州市| 东港市| 广饶县| 察哈| 大石桥市| 耒阳市| 浪卡子县| 阿尔山市| 太仆寺旗| 德清县| 嘉峪关市| 延津县| 湟中县| 乡宁县| 广汉市| 绍兴市| 本溪| 隆林| 巩留县| 平泉县| 芒康县| 潮州市| 洪江市| 峡江县| 枞阳县| 威宁| 龙门县| 海门市|