ch
github.com/saiumesh535/chi-http
go get github.com/saiumesh535/chi-http
ch

github.com/saiumesh535/chi-http

Chi-http example for golang

go get github.com/saiumesh535/chi-http
Readme

chi-http

Chi-http example for golang

Chi is great library for creating HTTP services and it has easy routing system.

Motivation

When I started learning golang, it was little difficult to find basic examples. This repository will try to address some problems that I encountered while learning golang.

This Repository will have basic examples to implement your APIs.

Installation

For installing all the dependencies run go get -d ./...

This project didn't update with go mods.

start server

You can start server by running command go run main.go

if you want to restart server on file change follow below steps

  1. Install realize by running go get github.com/oxequa/realize

  2. start server by realize start

Table of Contents

  • main.go main.go file which bootstrap our project

  • database/connectdb MongoDB connection example

  • Auth Folder contains login and sign up examples and also router Mount example.

  • download Folder contains Downloading files from golang server example

  • static Folder contains example for serving static file to browser such as html/css

  • upload contains example for uploading files using golang

  • Private Creating private routes for APIS, which requires JWT token

some helpful resources for learning

Since working with JSON in golang is pretty confusing for many people, so making some of the good resources below.

write your own middlewares

https://justinas.org/writing-http-middleware-in-go

GitHub Stars

11

LAST COMMIT

3yrs ago

MAINTAINERS

0

CONTRIBUTORS

1

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.0.0-20190413054702-c48e0c49c9a7
2yrs ago
No alternatives found
No tutorials found
Add a tutorial