Golang project that can connect to laravel with passport library
It comes pre-configured with :
- Gin Gonic Router (https://github.com/gin-gonic/gin)
- JWT-GO (https://github.com/dgrijalva/jwt-go)
- Viper (https://github.com/spf13/viper)
- Cobra (https://github.com/spf13/cobra)
- Testify (https://github.com/stretchr/testify)
Use this command to install the blueprint
go get github.com/rifqiakrm/golara-boilerplate
or manually clone the repo and then run go run main.go
.
Before you start the main service, you may want to set your environtment variables. You can choose it on the config, fill the env key and then set the env path file on cmd/root.go
rootCMD.PersistentFlags().StringVar(&cfgFile, "configs", "configs/config.{the_choosen_env}.toml", "configs file (example is $HOME/configs.toml)")
To make this golang project can connect the token from laravel passport you have to copy the oauth-private.key
and oauth-public.key
from your laravel project and then paste it to config/rsa-key
Thanks to the internet and Tabvn, you can follow this guide to deploy your application to the server