Install GO - https://golang.org/doc/install Install dep - https://github.com/golang/dep Install Redis - https://redis.io/topics/quickstart
Create a database (postgresql) as below to use the default configuration,
host=localhost
user=ireflect
password=1Reflect
dbname=ireflect-dev
You can override the default DB connection information by setting an ENV variable
export DB_DSN="host=localhost user=ireflect password=1Reflect dbname=ireflect-dev"
export DB_DRIVER="mysql"
go get -d github.com/iReflect/reflect-app
cd ~/go/src/github.com/iReflect/reflect-app
make vendor
make all
make run
Vist API at - http://localhost:3000/ Visit Admin at - http://localhost:3000/admin/
make test
make migrate up
make migrate status
Examples:
make migrate create <migration_name> go
make migrate create <migration_name> sql
For help - make migrate
dep ensure -add github.com/foo/bar
First, Generate a Refresh token using. https://developers.google.com/oauthplayground/ with Timesheet App's client_id, client_secret and following scopes
https://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/userinfo.email
Video instructions at https://www.youtube.com/watch?v=PJWrjAuIWWo
Use the Refresh token to create a JSON credentials file at config/timetracker_credentials.json
using following format
{
"type":"authorized_user",
"client_id":"xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
"client_secret":"xxxxxxxxx",
"refresh_token": "xxxxxxxxx"
}
Generate a client_id/client_secret for the iReflect's Authentication app. Note, select Web Application as the application type and provide origin and redirect url of the hosted webapp
Use the generated client_id/client_secret to create a JSON credentials file at config/application_default_credentials.json
using following format
{
"type": "authorized_user",
"web": {
"client_id": "xxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
"client_secret": "xxxxxxxxxxxxx",
"redirect_uris": [
"http://localhost:4200/auth"
]
}
}
Specify an environment variable SENTRY_DSN
to enable sentry logging for errors
SENTRY_DSN = https://<key>:<secret>@sentry.io/<project>
- https://github.com/golang/dep
- https://github.com/gin-gonic/gin
- https://github.com/jinzhu/gorm
- https://github.com/pressly/goose
- https://github.com/qor/qor
- Building Admin
- General Configuration
- Manage Resources
- Authentication
- Theming & Customization
- Extend QOR Admin
- Integrate with WEB frameworks
- Deploy To Production
- API Logging