Git Product home page Git Product logo

amprunner's Introduction

AMPRunner

Using aws lambdas function we can provide an AMP versión of any page

Install

Clone the repo and inside packages/serverless run $ npm install

Development

To start to develop run npm start that will put a server listen in at the port 3000 by default o any port setting in the process.env.PORT variable.

The server will response to GET request with the format:

http://localhost:3000/amp/[URL_CANONICAL_ORIGINAL]?package=[AMP_PACKAGE_TEMPLATE]&organization=[ORG_AMP_PACKAGE_TEMPLATE]&version=[VERSION]

Url example:

http://localhost:3000/amp/https://www.fotocasa.es/vivienda/malaga-capital/parking-terraza-trastero-zona-comunitaria-piscina-panorama-142784244?package=amp-generator-alpha-basic&organization=schibstedspain&version=beta

Version is the uniq param dont require, and by default we will search for the latest version.

Deploy

To deploy this package you must have install globally the up package.

To deploy to staging: $up deploy to deploy to production: up deploy production

More up command in the up documentation

### AMP parser pacakges

Is regular npm packages, with two files in the root of the project.

  • queries.js
  • index.tpl

amprunner's People

Contributors

carlosvillu 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.