Skip to content

cosmicjs/serverless-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Starter

Serverless Node.js starter app powered by Cosmic JS 🚀

Installation

Install via the Cosmic CLI.

npm i -g cosmic-cli

# Login to your Cosmic JS account
cosmic login

# Installs example content to a new or existing Bucket and downloads the app locally
cosmic init serverless-starter
cd serverless-starter

Install Serverless

Install Serverless and login.

npm i -g serverless
serverless login

Run locally

Start serverless server locally.

# starts app locally connected to your Cosmic JS Bucket
cosmic develop

Configure AWS credentials

Add your AWS keys. Follow the guide on the Serverless website for more instructions.

export AWS_ACCESS_KEY_ID=<your-key-here>
export AWS_SECRET_ACCESS_KEY=<your-secret-key-here>

Deploy to AWS

Deploying to AWS is easy using the Serverless deploy command.

COSMIC_BUCKET=your-bucket-slug sls deploy

Cosmic JS offers a Headless CMS for your Serverless websites and apps.

Releases

No releases published

Packages

No packages published