TibebeJS / yenepay.sample-shop.go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yenepay.sample-shop.go

tests linter Deploy Go Report Card Heroku

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.

Try out the Live Demo

2. Manual Installation

pre-requisites

  • PostgreSQL

  • Go 1.x (tested with v1.15)

  • GOPATH should be properly configured. At minimum revel should be resolved in PATH.

    You can try running the following (on linux):

    $ export GOPATH=/home/$USER/go
    $ export PATH=$PATH:$GOPATH/bin
    
  1. Clone this repository:
$ git clone git@github.com:TibebeJS/yenepay.sample-shop.go.git
  1. cd into the newly created folder:
$ cd yenepay.sample-shop.go
  1. 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"
  1. install dependencies:
$ go get github.com/revel/cmd/revel
$ go get github.com/go-gorp/gorp
  1. remove previous builds and run the application:
$ rm -rf target
$ revel run -a .
  1. Navigate to http://localhost:9000 on your favourite browser.

3. Using Docker/Docker-Compose

  1. Clone this repository:
$ git clone git@github.com:TibebeJS/yenepay.sample-shop.go.git
  1. cd into the newly created folder:
$ cd yenepay.sample-shop.go
  1. Start App via Docker-compose:
$ docker-compose up --build
  1. Navigate to http://localhost:9000 on your favourite browser :)

Under Construction


Coming soon...

About

License:MIT License


Languages

Language:CSS 66.6%Language:JavaScript 29.9%Language:Go 2.2%Language:HTML 1.2%Language:Dockerfile 0.1%Language:Shell 0.0%