yenepay.sample-shop.go
An online book shop app to demonstrate Yenepay-Go:
- Built with Go (revel framework)
- Using a PostgreSQL database with GORP (ORM-ish library)
- with working authentication (Interceptors, Models)
- YenePay integrated for Payment (using yenepay.sdk.go library)
Quick Start
1. Try using a Deployed/Live Server
The latest version of this app is continuously deployed (CD pipeline) to Heroku as soon as new changes on master branch are found.
You can use that to quickly try out the application without having to manually build/install.
2. Manual Installation
pre-requisites
-
PostgreSQL
-
Go 1.x (tested with v1.15)
-
GOPATH
should be properly configured. At minimumrevel
should be resolved inPATH
.You can try running the following (on linux):
$ export GOPATH=/home/$USER/go $ export PATH=$PATH:$GOPATH/bin
- Clone this repository:
$ git clone git@github.com:TibebeJS/yenepay.sample-shop.go.git
cd
into the newly created folder:
$ cd yenepay.sample-shop.go
- set an
DATABASE_URL
environment variable with the postgres connection string:
$ export DATABASE_URL="host=<your_db> user=<your_user> password=<your_password> dbname=<your_db> sslmode=disable"
Make sure to replace all the values inside "<
" and ">
" with your credential values.
Example:
$ export DATABASE_URL="host=localhost user=postgres password=postgres dbname=my_db sslmode=disable"
- install dependencies:
$ go get github.com/revel/cmd/revel
$ go get github.com/go-gorp/gorp
- remove previous builds and run the application:
$ rm -rf target
$ revel run -a .
- Navigate to
http://localhost:9000
on your favourite browser.
3. Using Docker/Docker-Compose
- Clone this repository:
$ git clone git@github.com:TibebeJS/yenepay.sample-shop.go.git
cd
into the newly created folder:
$ cd yenepay.sample-shop.go
- Start App via Docker-compose:
$ docker-compose up --build
- Navigate to
http://localhost:9000
on your favourite browser :)
Under Construction
Coming soon...