This app is a demo of using a Beego powered backend, with a Vue.js powered frontend.
- 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.
- 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.
- 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
- 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
GraphiQL UI is embedded as is. This was blatantly "ripped off" from the graphql-go Github repo StarWars Example
- Tests are missing completely - Will add them as time goes by
Pull Requests are more than welcome!