该项目 repo 已失效,下落不明 :-)。
bee-gorm-graphql
在后端使用 Beego + Gorm + graphql-go 和在前端使用 Vue.js 的应用程序示例。「Example application with Beego + Gorm + graphql-go in the backend & Vue.js in the frontend」
Github星跟踪图
主要指标
- 概览
-
名称与所有者 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!