该项目 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 stars Tracking Chart
Main metrics
- Overview
-
Name With Owner zohararad/bee-gorm-graphql Primary Language JavaScript Program language JavaScript (Language Count: 3) Platform License: Other - 所有者活动
-
Created At 2013-03-31 17:32:34 Pushed At 2018-09-07 05:36:04 Last Commit At 2018-09-07 07:36:03 Release Count 0 - 用户参与
-
Stargazers Count 536 Watchers Count 67 Fork Count 71 Commits Count 560 Has Issues Enabled Issues Count 209 Issue Open Count 38 Pull Requests Count 134 Pull Requests Open Count 6 Pull Requests Close Count 7 - 项目设置
-
Has Wiki Enabled Is Archived Is Fork Is Locked Is Mirror Is Private
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!