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!