bee-gorm-graphql

在后端使用 Beego + Gorm + graphql-go 和在前端使用 Vue.js 的应用程序示例。「Example application with Beego + Gorm + graphql-go in the backend & Vue.js in the frontend」

  • 所有者: zohararad/bee-gorm-graphql
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

该项目 repo 已失效,下落不明 :-)。

主要指標

概覽
名稱與所有者zohararad/bee-gorm-graphql
主編程語言JavaScript
編程語言JavaScript (語言數: 3)
平台
許可證Other
所有者活动
創建於2013-03-31 17:32:34
推送於2018-09-07 05:36:04
最后一次提交2018-09-07 07:36:03
發布數0
用户参与
星數536
關注者數67
派生數71
提交數560
已啟用問題?
問題數209
打開的問題數38
拉請求數134
打開的拉請求數6
關閉的拉請求數7
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Beego, Gorm, GraphQL & Vue.js demo

This app is a demo of using a Beego powered backend, with a Vue.js powered frontend.

Server-Side

  • Beego - Golang powered Web framework.
  • Gorm - Golang ORM - used instead of Beego's ORM due to better support of Postgres features (and fun).
  • graphql-go - Golang implementation of GraphQL.

Client-Side

  • Vue.js - used to build the UI components.
  • Vuex - state management for Vue.js.
  • Vue Router - router for Vue.js, using for routing support.
  • Bulma - CSS framework used to for UI components.

Setup

  • Install Node.js & Golang (project was developed on Golang v1.7)
  • Install glide for Golang dependency management.
  • Install yarn for client-side dependency management.
  • Run the following:
$ go get github.com/zohararad/bee-gorm-graphql
$ cd $GOPATH/src/github.com/zohararad/bee-gorm-graphql
$ yarn install
$ glide up
$ go get github.com/beego/bee
$ npm run build
$ bee run #open http://localhost:8080

Next Steps

  • You need to setup your Postgres DB (take a look at conf/app.conf)
  • You need to create at least one user - Easiest way is to do so via the GraphiQL UI - http://localhost:/graphql. Take a look at graphql/schema.go for the query structure
  • Log into the system http://localhost:8080/session/login
  • Enjoy

Credits

GraphiQL UI is embedded as is. This was blatantly "ripped off" from the graphql-go Github repo StarWars Example

Todo

  • Tests are missing completely - Will add them as time goes by

Contributions

Pull Requests are more than welcome!