Coder Social home page Coder Social logo

ampbench's Introduction

##AMPBench: AMP URL Validation and Troubleshooting

###What does it do?

AMPBench is a web application and service that validates AMP URLs + their associated Structured Data.

During AMP URL validation, it builds referable, support-friendly sharable URLs such as the following:

AMPBench in action

###License

AMPBench is licensed under the Apache 2.0 LICENSE.

###Disclaimer

AMPBench is not an official Google product.

###Getting the code and running it

Install Node.js version 4.X on your system. E.g., by downloading or by using a package manager or by using NVM.

Now do the following from a terminal command-line session:

$ git clone https://github.com/ampproject/ampbench.git
$ cd ampbench
$ npm update
$ nodemon
# or:
$ npm start

Also try navigating to these links from your web browser:

Even try this from the command-line:

$ curl http://localhost:8080/version/
$ curl http://localhost:8080/raw?url=https://ampbyexample.com/
$ curl http://localhost:8080/api?url=https://ampbyexample.com/
$ curl http://localhost:8080/api2?url=https://ampbyexample.com/

####Requesting an AMPHTML Validator reload from the CDN (https://cdn.ampproject.org/v0/validator.js)

Use the following URL to ask AMPBench to reload the validator code into memory should a different (not only newer; there might have been a rollback) version be available:

../command_force_validator_update

For example:

Or:

$ curl http://localhost:8080/command_force_validator_update

###Deploying AMPBench to the Cloud

####Deploying AMPBench to Google Compute Engine

To deploy AMPBench to the App Engine flexible environment, you need to have a Google Cloud Platform Console project.

Please review the following documentation:

From within the ampbench source root folder, deplyoment to Google Compute Engine, App Engine flexible environment, should be similar to the following sequence.

Run gcloud init:

$ gcloud init

Deploy and run:

$ gcloud app deploy 

####Deploying AMPBench to Amazon Web Services (AWS)

AWS Elastic Beanstalk uses highly reliable and scalable services that are available in the AWS Free Usage Tier and supports apps developed in Node.js, such as AMPBench, out-of-the-box.

Please review the following documentation:

Make sure to set up AWS with your account credentials:

The Elastic Beanstalk Command Line Interface (EB CLI) is configured as follows:

From within the ampbench source root folder, deplyoment to AWS Elastic Beanstalk environment should be similar to the following:

$ eb init # only initially or when the configuration changes
$ eb deploy

ampbench's People

Contributors

pietergreyling avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.