GitXplorerGitXplorer
g

golang-gin-realworld-example-app

public
2535 stars
499 forks
9 issues

Commits

List of commits on branch master.
Verified
728cb04bfefc00982600676ea1ad70ff01c6e598

update to latest dependencies (#30)

ttonyalaribe committed 2 years ago
Verified
e4174a9d6450e9e993d9b89a0dace58b7994c045

Corrected Install Dependencies instructions in readme.md. (#26)

ppvillela committed 4 years ago
Verified
9eabef3bae566c883837d9ab17e016e186ea6d84

Updated README.md to align with introduction of modules. (#25)

ppvillela committed 4 years ago
Verified
524884b051bf631b87db244ef92cb7d78d7a2c93

Made compatible with Go modules: added go.mod, removed vendors and dependence on github.com/wangzitian0/golang-gin-starter-kit. (#23)

ppvillela committed 4 years ago
Verified
d5d69550e66cdc5d671a8b704ea20e457917e3f8

Merge pull request #7 from itssujan/master

wwangzitian0 committed 6 years ago
Unverified
3e01bbcd3aad975977426508dcf104ba03322dd6

updating readme with additional instructions for getting crypto

iitssujan committed 6 years ago

README

The README file for this repository.

RealWorld Example App

Build Status codecov License: MIT GoDoc

Golang/Gin codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

This codebase was created to demonstrate a fully fledged fullstack application built with Golang/Gin including CRUD operations, authentication, routing, pagination, and more.

Directory structure

.
├── gorm.db
├── hello.go
├── common
│   ├── utils.go        //small tools function
│   └── database.go     //DB connect manager
├── users
|   ├── models.go       //data models define & DB operation
|   ├── serializers.go  //response computing & format
|   ├── routers.go      //business logic & router binding
|   ├── middlewares.go  //put the before & after logic of handle request
|   └── validators.go   //form/json checker
├── ...
...

Getting started

Install Golang

Make sure you have Go 1.13 or higher installed.

https://golang.org/doc/install

Environment Config

Set-up the standard Go environment variables according to latest guidance (see https://golang.org/doc/install#install).

Install Dependencies

From the project root, run:

go build ./...
go test ./...
go mod tidy

Testing

From the project root, run:

go test ./...

or

go test ./... -cover

or

go test -v ./... -cover

depending on whether you want to see test coverage and how verbose the output you want.

Todo

  • More elegance config
  • Test coverage (common & users 100%, article 0%)
  • ProtoBuf support
  • Code structure optimize (I think some place can use interface)
  • Continuous integration (done)