Giter Club home page Giter Club logo

serverless-finch's Introduction

serverless-finch

npm npm license

A Serverless Framework plugin for deployment of static website assests of your Serverless project to AWS S3.

Forked from the serverless-client-s3 https://github.com/serverless/serverless-client-s3/

First, install:

npm install --save serverless-finch

Second, update serverless.yml by adding the following:

plugins:
  - serverless-finch

custom:
  client:
    bucketName: unique-s3-bucketname-for-your-website-files
  • Warning: The plugin will overwrite any data you have in the bucket name you set above if it already exists.

Third, Create a client/dist folder in the root directory of your Serverless project. This is where your distribution-ready website should live.

The plugin simply uploads the entire client/dist folder to S3 and configures the bucket to host the website and make it publicly available.

To test the plugin initially you can copy/run the following commands in the root directory of your Serverless project to get a quick sample website for deployment:

mkdir -p client/dist
touch client/dist/index.html
touch client/dist/error.html
echo "Go Serverless" >> client/dist/index.html
echo "error page" >> client/dist/error.html

Fourth, run the plugin, and visit your new website!

serverless client deploy [--stage $STAGE] [--region $REGION]

The plugin should output the location of your newly deployed static site to the console.

If later on you want to take down the website you can use:

serverless client remove

Release Notes

v1.2.*

  • Added the remove option to tear down what you deploy. (Pull 10 thanks to redroot)
  • Fixed automated builds for the project (no functional differences)

Contributors

serverless-finch's People

Contributors

fernando-mc avatar redroot avatar

Watchers

James Cloos avatar  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.