Skip to content

yamitzky/serverless-headless-cms

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Serverless Headless CMS using Firebase

demo

Demo: Vercel / Firebase Hosting

Development

Create .env file.

NEXT_PUBLIC_FIREBASE_CONFIG={"apiKey":"AIzaSy..."}
yarn
yarn dev

Open http://localhost:3000 with your browser to see the result.

Deployment

git clone https://github.com/yamitzky/serverless-headless-cms.git
cd serverless-headless-cms

# create and edit .env, or set environment variable
NEXT_PUBLIC_FIREBASE_CONFIG={"apiKey":"AIzaSy..."}
# Optional: configure CMS
NEXT_PUBLIC_CMS_CONFIG={"resourcesPath":"{{rid}}","resourcePath":"{{rid}}/{{iid}}","userAppsPath":"users/_/applications","userAppPath":"users/_/applications/{{id}}","title":"Your CMS","hideGitHubLogo":true,"hideLandingPage":true,"authMethods":["google"],"singleProject":true,"schemaPermission":"owner","securityPermission":"owner"}

# deploy to firebase
yarn install
yarn deploy --project {project_id}
# yarn deploy --project {project_id} --site {site_id}