Coder Social home page Coder Social logo

rizqyfahmi / crosscheck-golang Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 141 KB

It contains of Crosscheck REST API development based on Golang

Shell 4.82% Dockerfile 0.89% Makefile 6.32% Go 87.96%
golang clean-architecture docker docker-compose echo-framework godotenv makefile restful-api behavior-driven-development

crosscheck-golang's Introduction

Prolog

This aim of this project was creating a REST API that is implementing Clean Architecture, and BDD based on Golang. However, it has not covered possibilities that it also can be used for more reasons

Prerequisites

  1. Go 1.17
  2. PostgreSQL 11
  3. Git
  4. Brew
  5. Make
  6. Docker
  7. Golang-migrate
  8. Ginkgo
  9. Mockgen

Get Started

# Check the prerequisites
make check

# Run the application and database container/image
make compose-up

# Build and run the application and database container/image in daemon mode
make compose-up mode="daemon"

# Stop the application and database container/image
make compose-down

# Stop and drop the application and database container/image
make compose-down mode="clean"

Migration Commands

# Create a migration file
make migrate-create name="create_table"

# Apply all migrations
make migrate-up

# Apply some of migration files up to specific version
make migrate-up version=1

# Reverse all migrations
make migrate-down version=1

# Reverse some of migration files down to specific version
make migrate-down version=1

Testing Commands

Make sure that you already have test suite on the same path you generate test file

# create a test suite into specific path
make test-bootstrap path="tests"

# create a test file into specific path
make test-generate path="tests" name="utils"

# create a mock file
make test-generate-mock source="path/file.go" destination="path/file_mock.go" package="some_package"

# running all test suites
make test-run

More Commands

All commands below is used for managing application container independently (exclude database)

# Build the image of the application
make app-build

# Run the container of the application
make app-start

# Run the container of the application daemonly
make app-start-daemon

# Stop the container of the application
make app-stop

# Drop/remove the image of the application
make app-drop

crosscheck-golang's People

Contributors

rizqyfahmi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

adhiana46

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.