Skip to content

cosmicjs/go-cosmic-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go + Cosmic

Image

This repo contains an example blog starter that is built with Go, and Cosmic.

See live demo hosted on Heroku

Prerequisites

  • Go (I recommend using v1.15 or higher)

Install

go mod download
go get github.com/cespare/reflex
npm install

Configuration

In .env you need to add configuration for your Cosmic Bucket

# copy .env.example to .env
cp .env.example .env

add BUCKET_SLUG & READ_KEY if required

Run

# Then you can run it by
# Note: this command will only run on OSX and Linux. As reflex utility is only compatible on these platforms.
# On windows, you can run the application using `go run app.go` 
npm start

Or you can build your application using

npm run build

then navigate to http://localhost:8080 to access your application