项目作者: cosmicjs

项目描述 :
Example blog built with Go and the Cosmic Headless CMS 🔥
高级语言: Go
项目地址: git://github.com/cosmicjs/go-cosmic-blog.git
创建时间: 2020-08-26T23:17:38Z
项目社区:https://github.com/cosmicjs/go-cosmic-blog

开源协议:

下载


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

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

Configuration

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

  1. # copy .env.example to .env
  2. cp .env.example .env

add BUCKET_SLUG & READ_KEY if required

Run

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

Or you can build your application using

  1. npm run build

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