Giter Club home page Giter Club logo

fluct's Introduction

Fluct

Fluct is a web-application framework that includes everything needed to manage Amazon API Gateway and Amazon Lambda backend web applications. The goals of this project are:

  • Server-less web application
  • Easy and rapid development
  • Multiple staging environments
  • Endpoint-isolated deployments
  • Infinite scalability
  • Cost savings

Install

npm install fluct -g

Usage

fluct new

Create a new application (where "myapp" is the application name):

$ fluct new myapp
Created ./myapp
Created ./myapp/.gitignore
Created ./myapp/actions
Created ./myapp/actions/.keep
Created ./myapp/package.json

fluct generate

Generate a new action (where "list_users" is the action name):

$ fluct generate action list_users
Created ./actions/list_users
Created ./actions/list_users/dist
Created ./actions/list_users/dist/index.js
Created ./actions/list_users/package.json

fluct server

Launches a local web server that behaves like Amazon API Gateway for development use. You'll use this any time you want to access your web application in your local machine.

$ fluct server
Server starting on http://127.0.0.1:3000

fluct deploy

Upload your functions to Amazon Lambda and update your endpoints on Amazon API Gateway.

$ fluct deploy
Created ./actions/list_users/dist.zip
Uploaded list_users function
POST   https://apigateway.us-east-1.amazonaws.com/restapis
DELETE https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/models/Empty
DELETE https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/models/Error
GET    https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/resources
GET    https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/resources
POST   https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/resources/k1xqcw5cj8
GET    https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/resources
PUT    https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/resources/i7qrat/methods/GET
PUT    https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/resources/i7qrat/methods/GET/integration
PUT    https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/resources/i7qrat/methods/GET/responses/200
PUT    https://apigateway.us-east-1.amazonaws.com/restapis/nob3eusi70/resources/i7qrat/methods/GET/integration/responses/200

fluct routes

List all routes.

$ fluct routes
GET    /recipes (list_recipes)
POST   /recipes (create_recipe)
GET    /users (list_users)

Action

The behaviors of your application is defined as a collection of actions. An action is defined in a set of index.js and package.json files, located in a directory named with its action name (e.g. list_users).

index.js

index.js defines a handler for your Amazon Lambda function.

export.handler = function (event, context) {
  context.succeed({ foo: 'bar' });
};

package.json

package.json defines package dependencies and metadata for Lambda & API Gateway.

{
  "name": "list_users",
  "version": "0.0.1",
  "fluct": {
    "httpMethod": "GET",
    "path": "/users"
  }
}

fluct's People

Contributors

r7kamura avatar

Watchers

Shimon Mochizuki 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.