All Projects → hyperform-dev → hyperform

hyperform-dev / hyperform

Licence: Apache-2.0 License
⚡ Lightweight serverless framework for NodeJS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to hyperform

Components
The Serverless Framework's new infrastructure provisioning technology — Build, compose, & deploy serverless apps in seconds...
Stars: ✭ 2,259 (+1348.08%)
Mutual labels:  lambda, aws-lambda, faas, serverless-framework
Zappa
Serverless Python
Stars: ✭ 11,859 (+7501.92%)
Mutual labels:  lambda, aws-lambda, api-gateway, serverless-framework
Serverless Express
Run Node.js web applications and APIs using existing application frameworks on AWS #serverless technologies such as Lambda, API Gateway, Lambda@Edge, and ALB.
Stars: ✭ 4,265 (+2633.97%)
Mutual labels:  lambda, aws-lambda, api-gateway, serverless-framework
Serverless Next.js
⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
Stars: ✭ 2,977 (+1808.33%)
Mutual labels:  lambda, aws-lambda, api-gateway, serverless-framework
Zappa
Serverless Python
Stars: ✭ 224 (+43.59%)
Mutual labels:  lambda, aws-lambda, api-gateway, serverless-framework
Serverless Es Logs
A Serverless plugin to transport logs to ElasticSearch
Stars: ✭ 51 (-67.31%)
Mutual labels:  lambda, aws-lambda, api-gateway, serverless-framework
Up
Up focuses on deploying "vanilla" HTTP servers so there's nothing new to learn, just develop with your favorite existing frameworks such as Express, Koa, Django, Golang net/http or others.
Stars: ✭ 8,439 (+5309.62%)
Mutual labels:  lambda, aws-lambda, deployment, api-gateway
faaskit
A lightweight middleware framework for functions as a service
Stars: ✭ 24 (-84.62%)
Mutual labels:  lambda, aws-lambda, faas
Serverless Sam
Serverless framework plugin to export AWS SAM templates for a service
Stars: ✭ 143 (-8.33%)
Mutual labels:  lambda, aws-lambda, serverless-framework
nuxt-on-lambda
Nuxt.jsをAWS Lambdaで動かす
Stars: ✭ 78 (-50%)
Mutual labels:  lambda, aws-lambda, serverless-framework
Json Serverless
Transform a JSON file into a serverless REST API in AWS cloud
Stars: ✭ 108 (-30.77%)
Mutual labels:  lambda, deployment, serverless-framework
Laravel Bridge
Package to use Laravel on AWS Lambda with Bref
Stars: ✭ 168 (+7.69%)
Mutual labels:  lambda, aws-lambda, faas
Bref
Serverless PHP on AWS Lambda
Stars: ✭ 2,382 (+1426.92%)
Mutual labels:  lambda, aws-lambda, faas
twitter
A serverless social network that's under development with some cool stuff, such as Serverless Framework, AppSync, GraphQL, Lambda, DynamoDB, Cognito, Kinesis Firehose, and Algolia ☁️
Stars: ✭ 29 (-81.41%)
Mutual labels:  lambda, aws-lambda, serverless-framework
Flogo
Project Flogo is an open source ecosystem of opinionated event-driven capabilities to simplify building efficient & modern serverless functions, microservices & edge apps.
Stars: ✭ 1,891 (+1112.18%)
Mutual labels:  lambda, aws-lambda, faas
Hello Lambda
🔥 An example of a Python (AWS) Lambda exposed with API Gateway, configured with Terraform.
Stars: ✭ 114 (-26.92%)
Mutual labels:  lambda, aws-lambda, api-gateway
Serverless Chrome
🌐 Run headless Chrome/Chromium on AWS Lambda
Stars: ✭ 2,625 (+1582.69%)
Mutual labels:  lambda, aws-lambda, serverless-framework
Apilogs
Easy logging and debugging for Amazon API Gateway and AWS Lambda Serverless APIs
Stars: ✭ 216 (+38.46%)
Mutual labels:  lambda, aws-lambda, api-gateway
serverless
BlueNimble is a Hybrid Serverless Platform focusing on developer productivity and application portability. Create and run scalable APIs and applications without coding or by coding less. Focus on application business logic without any knowledge of the underlying microservices architecture.
Stars: ✭ 30 (-80.77%)
Mutual labels:  api-gateway, faas, serverless-framework
super-serverless-sample
Backend serverless que simula o sistema de votação do BBB
Stars: ✭ 30 (-80.77%)
Mutual labels:  lambda, aws-lambda, api-gateway

Hyperform Banner

Lightweight serverless framework for NodeJS

  • Unopinionated (Any JS code works)
  • Lightweight (no wrapping)
  • 1-click deploy (1 command)
  • Multi-Cloud (for AWS & Google Cloud)
  • Maintains (provider's conventions)

Install

$ npm install -g hyperform-cli

Usage

  • Everything works like a normal NodeJS app. You can use NPM packages, external files, assets, since the entire folder containing hyperform.json is included with each function.

AWS Lambda

// somefile.js

// AWS Lambda uses 'event', 'context', and 'callback'  convention
// Learn more: https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html

exports.foo = (event, context, callback) => {
  context.succeed({
    message: "I'm Foo on AWS Lambda!"
  })
}

exports.bar = (event, context, callback) => {
  context.succeed({
    message: "I'm Bar on AWS Lambda!"
  })
}

// ... 

Create a hyperform.json in the current folder, with your AWS credentials:

{
  "amazon": {
    "aws_access_key_id": "...",
    "aws_secret_access_key": "...",
    "aws_region": "..."
  }
}

In the terminal, type:

$ hyperform deploy somefile.js --amazon --url
  > 🟢 foo https://w3g434h.execute-api.us-east-2.amazonaws.com/foo
  > 🟢 bar https://w3g434h.execute-api.us-east-2.amazonaws.com/bar

... and your functions are deployed & invocable via GET and POST.

Google Cloud Functions

// somefile.js

// Google Cloud uses Express's 'Request' and 'Response' convention
// Learn more: https://expressjs.com/en/api.html#req 
//             https://expressjs.com/en/api.html#res

exports.foo = (req, res) => {
  let message = req.query.message || req.body.message || "I'm a Google Cloud Function, Foo";
  res.status(200).send(message);
};

exports.bar = (req, res) => {
  let message = req.query.message || req.body.message || "I'm a Google Cloud Function, Bar";
  res.status(200).send(message);
};

Create a hyperform.json in the current folder with your Google Cloud credentials:

{
  "google": {
    "gc_project": "...",
    "gc_region": "...",
  }
}

In the terminal, type:

$ hyperform deploy somefile.js --google --url    
  > 🟢 foo https://us-central1-someproject-153dg2.cloudfunctions.net/foo 
  > 🟢 bar https://us-central1-someproject-153dg2.cloudfunctions.net/bar 

... and your functions are deployed & invocable via GET and POST.

Hints & Caveats

  • New functions are deployed with 256MB RAM, 60s timeouts
  • The flag --url creates unprotected URLs to the functions. Anyone with these URLs can invoke your functions
  • The entire folder containing hyperform.json will be deployed with each function, so you can use NPM packages, external files (...) just like normal.

FAQ

Where are functions deployed to?

  • On AWS: To AWS Lambda
  • On Google Cloud: To Google Cloud Functions

Where does deployment happen?

It's a client-side tool, so on your computer. It uses the credentials it finds in hyperform.json

Can I use NPM packages, external files, (...) ?

Yes. The entire folder where hyperform.json is is uploaded, excluding .git, .gitignore, hyperform.json, and for Google Cloud node_modules (Google Cloud installs NPM dependencies freshly from package.json). So everything works like a normal NodeJS app.

How does --url create URLs?

On AWS, it creates an API Gateway API (called hf), and a GET and POST route to your function.

On Google Cloud, it removes IAM checking from the function by adding allUsers to the group "Cloud Functions Invoker" of that function.

Note that in both cases, anyone with the URL can invoke your function. Make sure to add Authentication logic inside your function, if needed.

Opening Issues

Feel free to open issues if you find bugs.

Contributing

Always welcome ❤️ Please see CONTRIBUTING.md

License

Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].