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

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.

主站蜘蛛池模板: 吉林省| 扎囊县| 金乡县| 阳高县| 万山特区| 新邵县| 济阳县| 昂仁县| 集贤县| 万山特区| 建昌县| 巫山县| 梁平县| 南投市| 天峻县| 万荣县| 衡阳县| 利辛县| 江门市| 汤原县| 临湘市| 米脂县| 奉化市| 大宁县| 周至县| 集安市| 长垣县| 大兴区| 枣强县| 岳阳市| 云和县| 平阴县| 澄城县| 黄平县| 正镶白旗| 金山区| 北海市| 新密市| 柳林县| 璧山县| 昂仁县|