An open API service indexing awesome lists of open source software.

https://github.com/aegisblade/examples

AegisBlade Example Applications
https://github.com/aegisblade/examples

aegisblade cloud distributed-computing nodejs puppeteer python selenium

Last synced: 11 days ago
JSON representation

AegisBlade Example Applications

Awesome Lists containing this project

README

          





Logo

AegisBlade Example Applications


A set of applications showing how to deploy and run code with AegisBlade.


Read the docs »




Sign Up for an API Key
·
Report Bug

## Table of Contents

* [Examples Listing](#examples)
* [Python](#python-listing)
* [Node.js](#nodejs-listing)
* [Running the Examples](#running-the-examples)
* [Prerequisites](#prerequisites)
* [Python](#python-examples)
* [Node.js](#nodejs-examples)
* [License](#license)
* [Contact](#contact)

## Examples

### Python Listing

- [Hello World](./python/helloworld): Runs a simple job that fetches the server's hostname.

- [Local Library](./python/local_library): Shows how to link a local library as part of a job.

- [Selenium](./python/selenium): Shows usage of capabilities for both firefox and chrome selenium jobs.

### Node.js

- [Hello World](./nodejs/helloworld): Runs a simple job that fetches the server's hostname.

- [Local Library](./nodejs/local_library): Shows how to link a local library as part of a job.

- [Puppeteer](./nodejs/puppeteer): Demonstrates usage of capabilities to run puppeteer in a job for web crawling.

- [Puppeteer Chrome](./nodejs/puppeteer-chrome): Demonstrates running puppeteer that uses the 'google-chrome' binary.

## Running the Examples

[Sign up for an API Key][aegisblade-register] before running the examples.

Clone this repo and navigate to the example you'd like to run in your favorite shell.

```bash
$ git clone https://github.com/aegisblade/examples
$ cd examples
```

### Prerequisites

Set the `AEGISBLADE_API_KEY` environment variable.

```bash
$ export AEGISBLADE_API_KEY="my-api-key"
```

#### Python Examples

AegisBlade is supported on Python 2.7, 3.4 - 3.6.

- Ensure virtualenv is installed.

```bash
$ pip install virtualenv
```

- Create a new virtualenv and install the dependencies.

```bash
$ cd python/selenium
$ virtualenv venv
$ . ./venv/bin/activate
$ pip install -r ./requirements.txt
```

- Run the example.

```bash
$ python -u main.py
```

#### Node.js Examples

AegisBlade is supported on Node.js >= 8.0.

- Install dependencies.

```bash
$ cd nodejs/puppeteer
$ npm install
```

- Run the example.

```bash
node main.js
```

## License

Distributed under the Apache 2.0 License. See `LICENSE` for more information.

## Contact

AegisBlade - [@aegisbladehq](https://twitter.com/aegisbladehq) - welovedevs@aegisblade.com

Project Link: [https://github.com/aegisblade/examples](https://github.com/aegisblade/examples)

[aegisblade-register]: https://www.aegisblade.com/account/register
[aegisblade-docs]: https://www.aegisblade.com/account/register