0.1.0 • Published 5 months ago

hyperscale v0.1.0

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
5 months ago

HyperScale

Hyperscale is a cli tool that allows you to build and deploy highly scaling and completely serverless applications on AWS at lightening speed! Several popular front-end frameworks are supported including React, Vue and more!

Demo

Why use HyperScale?

Hyperscale is an integrated tool set, it allows you to deploy and modify your application with ease. Hyperscale has been built purposely to minimize your lock-in (tool-set wise anyway), so if you love your serverless stack and hyperscale isn't for you, simply move to a new tool set or manage your stack yourself via the AWS console.

With hyperscale you can scale to reach millions of users more easily than deploying your application on a single server.

Getting Started

Installation

Before you begin ensure that the aws cli is correctly installed and configured.

To install hyperscale:

npm install hyperscale -g

React Tutorial

To start: Initialize your hyperscale project:

hyperscale init react

and follow the prompts.

This will create hyperscale.json configuration file and an application folder in your local directory.

Next step, create a cloud store for your application:

hyperscale deploy bucket

We will need to run an application build:

hyperscale build

This simply transpiles our react application and adds the build to our output folder (in the case build).

Finally deploy your application:

hyperscale deploy project

You should see something like:

Updated application available at: http://MY_PROJECT.s3-website-us-east-1.amazonaws.com

Enabling CDN

In most cases, you will want to deploy your static app contents to a CDN. Not to worry! This is exceedingly simple with hyperscale! Run:

hyperscale deploy dist

and you will see:

Application deployed to: CLOUD_FRONT_URL
The cloudfront distribution takes some time to setup
This can take up to 15 minutes so don't panic!

Deploying content to a cdn significantly improves application delivery.

Server (Function Execution)

This may be used (to some extent) in the place of a normal web-server for operations such as server-side rendering, API and database queries.

To initalize the server function:

hyperscale init server

This will create server/index.js which looks like:

exports.handler = function(event, context, callback) {
    console.log('Hello World!');
 }

This code will be executed on serveral event triggers, by default on origin-response. Deploy function code:

hyperscale deploy server

Update distribution (with Lambda Function Associations)

hyperscale update dist

In the case of the setup-here this is code executed between your static file store (S3) and the cache response (Cloudfront). In order to modify the event trigger here, or the runtime of your server file, open your hyperscale.json file in an editor and modify the corresponding attribute(s) under function:

    "function": {
        "type": "origin-response",
        "runtime": "nodejs6.10"
    }

For more information about how code is executed here: Edge-Functions.

APIs

If the function execution above does not meet your needs, you may wish to implement a more traditional set of web APIs for your application to consume. Hyperscale does not support this functionality however there are some pretty awesome frameworks that will help you construct fully serverless API infrastructure. Serverless is probably your best bet if you want to build your APIs with node.

Here is an great tutorial for deploying an Express API with Serverless: Tutorial.

If python is more your thing, checkout Zappa for seamless integration with your Flask or Django applications.

Front-End Frameworks

Hyperscale currently supports:

Configuring Custom Environments

You may want to configure your build options, commands and more! This is more than possible with Hyperscale. Simply open hyperscale.json in your favorite editor and edit the following attributes:

   "framework": "basic",
    "builds": {
        "output": ""
    }

for example, perhaps we had a custom build script, say build.bash which performed the build procedure on a project in /my_src and wrote the output to dist we could amend the above fields to:

    "builds" : {
        "output" : "dist",
        "operations" : {
            "build" : "bash build.bash"
        }
    }

and then again, we can simply run:

hyperscale build

to run the build process.

License

Hyperscale has an MIT license.

0.1.0

5 months ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago