bee-gorm-graphql

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

  • Owner: zohararad/bee-gorm-graphql
  • Platform:
  • License:: Other
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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

Main metrics

Overview
Name With Ownerzohararad/bee-gorm-graphql
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 3)
Platform
License:Other
所有者活动
Created At2013-03-31 17:32:34
Pushed At2018-09-07 05:36:04
Last Commit At2018-09-07 07:36:03
Release Count0
用户参与
Stargazers Count536
Watchers Count67
Fork Count71
Commits Count560
Has Issues Enabled
Issues Count209
Issue Open Count38
Pull Requests Count134
Pull Requests Open Count6
Pull Requests Close Count7
项目设置
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!