Content-Length: 269806 | pFad | http://github.com/saiumesh535/chi-http/blob/master/README.md

00 chi-http/README.md at master · saiumesh535/chi-http · GitHub
Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 2.61 KB

README.md

File metadata and controls

66 lines (41 loc) · 2.61 KB

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









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/saiumesh535/chi-http/blob/master/README.md

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy