Giter Site home page Giter Site logo

lambda-phantomjs-installer's Introduction

Lambda PhantomJS Installer

Description / Motivation

This package was created so that PhantomJS can easily be used on AWS Lambda. Due to code size limits on AWS Lambda, it is not always possible to package the preinstalled PhantomJS executable with your code. This package remedies that by allowing you to install PhantomJS from within your AWS Lambda function's code.

Installation

npm install --save lambda-phantomjs-installer

Make sure that you include lambda-phantomjs-installer in the zipfile you upload to AWS lambda so that your AWS Lambda function can find the package

Usage

var PhantomJSInstaller = require( 'lambda-phantomjs-installer' );

var phantomjs_installer = new PhantomJSInstaller();

exports.handler = function( event, context ) {
    phantomjs_installer
        .install()
        .then( function( phantomjs_path ) {
            console.log( 'PhantomJS Installed at ' + phantomjs_path );
            context.done();
        } )
        .catch( function( err ) {
            context.done( err );
        } );
};

See phantomjs_installer.js for more information about options that can be passed to the installer

lambda-phantomjs-installer's People

Contributors

frenchie4111 avatar nabilfreeman avatar

Stargazers

 avatar Bill McKessy avatar Liad Yosef avatar Vaidas Unchained avatar Alex Brandes avatar Felicioli Claudio avatar Alan deLevie avatar Peter Bray avatar

Watchers

James Cloos avatar Felicioli Claudio avatar Kruk avatar  avatar Gregg Golembeski avatar  avatar  avatar day kay avatar Trini  avatar João Carvalho 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.