Skip to content

bosssauce/frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

frontend

a Ponzu addon to create a web frontend for your CMS.

To install:

from within your Ponzu project, run:

$ ponzu add github.com/bosssauce/frontend

Usage:

// content/song.go

package content

import (
    // import the frontend addon
    "github.com/bosssauce/frontend"
    ...
)

type Song struct {
    title   string  `json:"title"`
    ...
}

func init() {
    // add routes/handlers to the frontend Router, which embeds a *mux.Router
    frontend.Router.HandleFunc("/songs", func(res http.ResponseWriter, req *http.Request) {
        // GET /api/contents?type=Song
        ...
    })
}

Releases

No releases published

Packages

No packages published

Languages