• Stars
    star
    147
  • Rank 243,182 (Top 5 %)
  • Language
    Go
  • Created over 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Forum Backend API built with Golang, GIn Framework, GORM, PostgreSQL/MySQL

Forum-App-Go-Backend CircleCI

This is a forum API built with Golang

Getting Started

[Technologies 路 路 Installations 路 路 TestsAuthor

Technologies Used

Installations

Clone

  • Clone this project to your local machine https://github.com/victorsteven/Forum-App-Go-Backend.git

Setup

Without Docker

Ensure that you have your .env set up and have created your database

  • For local, set the DB_HOST in the .env file as follows:
      $ DB_HOST=127.0.0.1

In the root directory, run the command

$ go run main.go
  • Use http://localhost:8080 as base url for endpoints

Using Docker

Docker is the default setting for this project

  • Set the DB_HOST as follows in the .env file
      $ DB_HOST=forum-postgres 
For Local Development:
  • Create a Dockerfile file in the root directory
  • Copy the content of the file: example.Dockerfile.dev (for only local development)
  • Create a docker-compose.yml file in the root directory
  • Copy the content of the file: example.docker-compose.dev.yml (for only local development)
For Testing:
  • Create a Dockerfile.test file in the root directory
  • Copy the content of the file: example.Dockerfile.test (for only test)
  • Create a docker-compose.test.yml file in the root directory
  • Copy the content of the file: example.docker-compose.test.yml (for only test)
For Production (This should be done in the server (AWS, DigitalOcean, etc)):
  • Create a Dockerfile file in the root directory
  • Copy the content of the file: example.Dockerfile.prod (for production only)
  • Create a docker-compose.yml file in the root directory
  • Copy the content of the file: example.docker-compose.prod.yml (for production only)

In the root directory, run the command:

$ docker-compose up --build
  • Use http://localhost:8888 as base url for endpoints

Tests

Without Docker

  • Run test for all endpoints

    Navigate to the tests directory and run

    $ go test -v ./...

Using Docker

  • Run test for all endpoints

    If you have set up the Dockerfile.test and the docker-compose.test.yml files above, from the root directory of the app.

    $ docker-compose -f docker-compose.test.yml up --build 

Author

  • Steven Victor
  • medium: medium.com/@victorsteven
  • twitter: twitter.com/stevensunflash
  • linkedin: linkedin.com/in/stevenchikodi

More Repositories

1

food-app-server

Exploring Domain-Driven Design in Golang
Go
535
star
2

Go-JWT-Postgres-Mysql-Restful-API

This is an API built with golang, jwt, gorm, postgresql, mysql
Go
437
star
3

jwt-best-practices

Go
127
star
4

Unit-And-Integration-Testing

A simple approach to understanding Unit and Integration testing in Golang
Go
92
star
5

Dockerized-Golang-Postgres-Mysql-API

This is the dockerized version of the api built here: https://github.com/victorsteven/Go-JWT-Postgres-Mysql-Restful-API
Go
77
star
6

Book-app-NodeJS-PostgreSQL-Travis-Coveralls-Code-Climate

This is a nodejs application
JavaScript
50
star
7

Forum-App-React-Frontend

This is the React client that consumes the API built here: https://github.com/victorsteven/Forum-App-Go-Backend
JavaScript
43
star
8

gophercon-jwt-repo

This is the gophercon repo
Go
31
star
9

food-app-client

Client of Food App
Vue
29
star
10

golang-algorithm-and-datastructure

A collection of Algorithm and DataStructures in Golang
Go
22
star
11

Deploy-GO-GORM-PostgreSQL-MySQL-API-To-Kubernetes

This is the third part of an article series, using Go, GORM, PostgreSQL, MySQL, JWT and deploying to Kubernetes.
Go
22
star
12

Laravel-Datatable-VueJS

This is a datatable project built from scratch with Laravel and VueJS
PHP
18
star
13

multi-choice-graphql-go-app

A sample project on working with Graphql and Golang.
Go
18
star
14

Username-Across-Platforms

This Application enable you check a given username on Twitter, Github, and so on, to see if that username for each account visited is the same. Here is a link to play with it: https://username-across.herokuapp.com
Go
12
star
15

sending-and-testing-emails-in-Go

Go
12
star
16

manage-jwt

This application enable you Create a JSON and Invalidate it when ever you wish without waiting for the token to expire. You can play with it here:
Go
10
star
17

Go-Interfaces-and-API-Testing

Go
8
star
18

Premier-League

A NodeJS API about premier league fixtures
JavaScript
7
star
19

Laravel-VueJS-Choose-Time-To-Send-Email

Send Notifications/Emails to subscriber by choosing specific date from the calendar
PHP
7
star
20

gallery-app

A gallery application built with Golang and VueJS.
Go
6
star
21

stackoverflow

A mock implementation of Stackoverflow using NodeJS
JavaScript
3
star
22

Interactive-Chatting-System-with-Laravel-and-VueJS

PHP
2
star
23

React-PokeTime-App

JavaScript
1
star
24

location-history-server

Go
1
star
25

Using-the-Youtube-API-with-Laravel-and-VueJS

PHP
1
star
26

affiliate_service

Go
1
star
27

fibonacci_sequence

An HTTP server that generates fibonacci sequence.
Go
1
star
28

Restful-API-Golang-PostgreSQL

Go
1
star
29

React-Blog

This is a blog app built with React
JavaScript
1
star
30

Go-gRPC-Kubernetes-GCloud

This is a text to speech application with golang, gRPC, kubernetes and google cloud
Go
1
star
31

golang-fullstack-apllication-with-jwt-authentication

Go
1
star
32

React-Weather-API

This is a React weather API
JavaScript
1
star
33

food-app-fiber-implementation

Go
1
star
34

Golang-Web-Programming-

Go
1
star
35

REST-API-Node-Postgresql-Sequelize

JavaScript
1
star
36

Restful-API-with-NodeJS

JavaScript
1
star
37

React-Project-Management-App

JavaScript
1
star
38

Golang-and-gRPC

This is a golang and gRPC project
Go
1
star
39

React-Youtube-App

This is a React App that uses the Youtube API to play videos
JavaScript
1
star
40

Multiple-Authentication-System-using-Native-Laravel

Multiple Authentication is crucial for medium to large scale applications. This repository is a Multiple Authentication package using Native Laravel
PHP
1
star