Giter VIP home page Giter VIP logo

tvitcom / tutorial-go-fiber-rest-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from koddr/tutorial-go-fiber-rest-api

0.0 1.0 0.0 215 KB

πŸ“– Build a RESTful API on Go: Fiber, PostgreSQL, JWT and Swagger docs in isolated Docker containers.

Home Page: https://dev.to/koddr/build-a-restful-api-on-go-fiber-postgresql-jwt-and-swagger-docs-in-isolated-docker-containers-475j

License: MIT License

Shell 1.21% Dockerfile 2.03% Makefile 4.85% Go 91.91%

tutorial-go-fiber-rest-api's Introduction

Preface

I (Roman tvitcom@github) did refactoring (according https://github.com/golang-standards/project-layout) that example. TODO change:

  • change db type to mysql
  • change code placng to appropriate directories

πŸ“– Tutorial: Build a RESTful API on Go

Fiber, PostgreSQL, JWT and Swagger docs in isolated Docker containers.

πŸ‘‰ The full article is published on March 22, 2021, on Dev.to: https://dev.to/koddr/build-a-restful-api-on-go-fiber-postgresql-jwt-and-swagger-docs-in-isolated-docker-containers-475j

fiber_cover_gh

Quick start

  1. go get -u github.com/swaggo/swag/cmd/swag
  2. wget https://github.com/golang-migrate/migrate/releases/download/v4.14.1/migrate.linux-amd64.tar.gz
  3. tar xzf migrate.linux-amd64.tar.gz && mv migrate.linux-amd64 migrate
  4. docker stop $(docker ps -q)
  5. Rename .env.example to .env and fill it with your environment values.
  6. Install Docker and migrate tool for applying migrations.
  7. Run project by this command:
sudo make docker.run

# Process:
#   - Generate API docs by Swagger
#   - Create a new Docker network for containers
#   - Build and run Docker containers (Fiber, PostgreSQL)
#   - Apply database migrations (using github.com/golang-migrate/migrate)
  1. Go to your API Docs page: 127.0.0.1:3000/swagger/index.html

Screenshot

⚠️ License

MIT Β© Vic ShΓ³stak & True web artisans.

tutorial-go-fiber-rest-api's People

Contributors

koddr avatar tvitcom avatar

Watchers

James Cloos avatar

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.