Skip to content

featureflagtech/serverless-static-https

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Static HTTPS plugin

serverless

Serverless plugin for running your local development over HTTPS to mirror a production setup of a webserver hosted with API Gateway + Lambda with static files hosted on S3.

To be used in tandem with:

NOTE: to run HTTPS servers locally you need to install SSL certificates:

1.install the plugin

$ npm install serverless-static-https --save-dev

2. add it to your serverless.yml file

Then inside your project's serverless.yml file add following entry to the plugins section: serverless-static. If there is no plugin section you will need to add it to the file.

It should look something like this:

plugins:
  - serverless-static-https 

3. customize behavior (optional)

custom:
  static-https:
    path: ./public # select the folder you want to serve
    port: 8000 # select a specific port
    pathToKeyFile: ./key.pem # relative path from PWD to key file
    pathToCertFile: ./cert.pem # relative path from PWD to cert file

# this will overide default behavior
# it will serve the folder ./public
# it will serve it throught https://localhost:8000

About

📦 serverless framework plugin - serve / deploy static files that works with serverless-offline plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%