当前位置: 首页 > 软件库 > 云计算 > Serverless 系统 >

serverless-chrome

🌐 Run headless Chrome/Chromium on AWS Lambda
授权协议 MIT License
开发语言 JavaScript
所属分类 云计算、 Serverless 系统
软件类型 开源软件
地区 不详
投 递 者 郁高韵
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

serverless-chrome

Serverless Chrome contains everything you need to get started running headlessChrome on AWS Lambda (possibly Azure and GCP Functions soon).

The aim of this project is to provide the scaffolding for using Headless Chromeduring a serverless function invocation. Serverless Chrome takes care ofbuilding and bundling the Chrome binaries and making sure Chrome is running whenyour serverless function executes. In addition, this project also provides a fewexample services for common patterns (e.g. taking a screenshot of a page,printing to PDF, some scraping, etc.)

Why? Because it's neat. It also opens up interesting possibilities for using theChrome DevTools Protocol(and tools like Chromeless orPuppeteer) in serverlessarchitectures and doing testing/CI, web-scraping, pre-rendering, etc.

Contents

  1. Quick Start
  2. The Project
  3. Examples
  4. Documentation & Resources
    1. Building Headless Chrome/Chromium
  5. Testing
  6. Articles & Tutorials
  7. Troubleshooting
  8. Roadmap
  9. Projects & Companies using serverless-chrome
  10. Change log
  11. Contributing
  12. Prior Art
  13. License

Quick Start

"Bla bla bla! I just want to start coding!" No problem:

Using AWS Lambda, the quickest way to get started is with theServerless-framework CLI.

First, install serverless globally (npm install -g serverless) and then:

serverless create -u https://github.com/adieuadieu/serverless-chrome/tree/master/examples/serverless-framework/aws

Then, you must configure your AWS credentials either by definingAWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environmental variables, orusing an AWS profile. You can read more about this on theServerless Credentials Guide.

In short, either:

export AWS_PROFILE=<your-profile-name>

or

export AWS_ACCESS_KEY_ID=<your-key-here>
export AWS_SECRET_ACCESS_KEY=<your-secret-key-here>

Then, to deploy the service and all of its functions:

npm run deploy

Further details are available in theServerless Lambda example.

The Project

This project contains:

Examples

A collection of example functions for different providers and frameworks.

Serverless-framework

Documentation & Resources

Building Headless Chrome/Chromium

Testing

Test with npm test. Each package also contains it's own integration testswhich can be run with npm run test:integration.

Articles & Tutorials

A collection of articles and tutorials written by others on using serverless-chrome

Troubleshooting

Can't get Selenium / ChromeDriver to work Make sure that the versions of serverless-chrome, chromedriver, and Selenium are compatible. More details in [#133]( https://github.com/adieuadieu/serverless-chrome/issues/133#issuecomment-382743975).

Roadmap

1.1

  1. Support for Google Cloud Functions
  2. Example for Apex
  3. Example for Claudia.js

1.2

  1. DOM manipulation and scraping example handler

Future

  1. Support for Azure Functions
  2. Headless Firefox

Projects & Companies using serverless-chrome

Tell us about your project on theWiki!

Change log

See the CHANGELOG

Contributing

OMG. Yes. Plz, halp meeee.

Prior Art

This project was inspired in various ways by the following projects:

License

serverless-chrome © Marco Lüthy. Released under the MIT license.
Authored and maintained by Marco Lüthy with help from contributors.

github.com/adieuadieu · GitHub @adieuadieu · Twitter @adieuadieu · Medium @marco.luethy

  • 2023.3.30 亚马逊云科技创新大会--全面拥抱Serverless时代 在北京召开。我在网络上报名,很快收到了亚马逊的确认邮件。很开心能参加这次活动: 会方准备充足,信息量大,顶级水平。有AWS首席布道师Jeff Barr的致辞,还有大中华区总经理Erik Chen对serverless的介绍,来自西门子Mendix技术总监的演示,来自PingCap/MiDB副总裁的演示。 workshop

  • 本文归纳于微服务与云原生 https://github.com/wx-chevalier/Backend-Series系列文章,其相关的参考资料声明于 Awesome Serverless List。 Serverless?Node.js Puppeteer 渗透测试爬虫实践 参考 CNCF 的定义,Serverless 是指构建和运行不需要服务器管理的应用程序的概念;而 AWS 官方对于 Ser

  • 何遇 「何遇」是一款Chrome扩展程序,其主要的功能是当你在 Chrome 浏览器中打开一个新的Tab页面时,空白页会展示出一些有趣的插图、句子、电影截图等,给苦涩的搬砖生活增添一丝乐趣,效果如下: 实现方案很简单,页面就是一个普通的前端页面,配置少许的 manifest.json 便可以直接转换为 Chrome 扩展程序,而后端服务是一个 HTTP 接口,返回页面展示的内容,该接口使用了阿里云

 相关资料
  • 云原生应用开发 回顾过去二十年,应用开发有以下几个显著的特点: 以应用服务器为中心,典型应用服务器包括 tomcat,JBoss,WebLogic,WebSphere,应用服务器提供了丰富的技术堆栈和系统构建范式,对应用开发人员友好 JavaEE/Spring,JavaEE/Spring 是应用开发的基本技能,这项技能有广泛的开发者基础,过去二十年中 JavaEE/Spring 的技术发展/版本的

  • The Serverless Framework (无服务器架构)允许你自动扩展、按执行付费、将事件驱动的功能部署到任何云。 目前支持 AWS Lambda、Apache OpenWhisk、Microsoft Azure,并且正在扩展以支持其他云提供商。 Serverless 降低了维护应用程序的总成本,能够更快地构建更多逻辑。它是一个命令行工具,提供脚手架、工作流自动化和开发部署无服务器架构的最佳实践。它也可以通过插件完全扩展。

  • Serverless Prisma [Archived] — New projects should consider using Prisma2 Minimal Serverless + Prisma Project Template Getting Started Be sure to have Docker and Make installed on your machine. Docker

  • Serverless Webpack A Serverless v1.x & v2.x plugin to build your lambda functions with Webpack. This plugin is for you if you want to use the latest Javascript version with Babel;use custom resource l

  • serverless-bundle serverless-bundle is a Serverless Framework plugin that optimally packages your ES6 or TypeScript Node.js Lambda functions with sensible defaults so you don't have to maintain your o

  • Serverless Express by Vendia Run REST APIs and other web applications using your existing Node.js application framework (Express, Koa, Hapi, Sails, etc.), on top of AWS Lambda and Amazon API Gateway.