Generate boilerplate + endpoints for Fiber REST APIs.

Overview

gomakeme

Generate boilerplate + endpoints for Fiber REST APIs.

Never spend 6 minutes doing something by hand when you can spend 1 week to automate it

Currently there are two options for the project that you could generate:

  1. Minimal setup with no endpoints

  2. Minimal setup that use modules

The option you choose is based on the gomakeme.yml config file

If there are modules specified in the config file, they will be added to the project.

For example, if your config file has some defined modules, like

modules: [User, Task]

The user_module will be created in the modules directory.

A single module will hold 5 basic CRUD endpoints, that will be automatically available to the server.

Once the directory for the user_module is created, it won't be updated / touched if you run the generator again, so you can edit them.

Examples of generated outputs can be seen in the examples directory

How to generate a server

  1. Clone the repo

  2. Change the gomakeme.yml config file

  3. Run go generate

  4. cd into the project and run go mod tidy

  5. run the server with go run main.go

Notes

  • Why Fiber? Because it's one of the fastest Go frameworks currently + takes inspiration from Express

  • The POST, PUT, DELETE endpoints won't work initially due to CSRF middleware in main.go.

  • Taking a bit of inspiration from Nest.js and to keep the global state management simple, we bundle most of the logic of a single module into seperate packages.

  • Only the router/project_modules.go file will be updated on the next go generate runs. All of the other files won't be touched.

  • There are probably bugs.

  • Don't plan to update this much in the future.

You might also like...
Best simple, lightweight, powerful and really fast Api with Golang (Fiber, REL, Dbmate) PostgreSqL Database and Clean Architecture

GOLANG FIBER API (CLEAN ARCHITECTURE) Best simple, lightweight, powerful and really fast Api with Golang (Fiber, REL, Dbmate) PostgreSqLDatabase using

X-Response-Time middleware for fiber/v2

fiber-responsetime X-Response-Time middleware for fiber/v2 go get github.com/husanu/fiber-responsetime/v2 package main import ( "time" "github.com

Opinionated boilerplate Golang HTTP server with CORS, OPA, Prometheus, rate-limiter for API and static website.
Opinionated boilerplate Golang HTTP server with CORS, OPA, Prometheus, rate-limiter for API and static website.

Teal.Finance/Garcon Opinionated boilerplate HTTP server with CORS, OPA, Prometheus, rate-limiter… for API and static website. Origin This library was

Boilerplate API template includes all the common packages and setup used for API development in this Company

Boilerplate API Boilerplate API template includes all the common packages and setup used for API development in this Company. Development Copy .env.ex

A Golang restful API boilerplate based on Echo framework v4

A Golang restful API boilerplate based on Echo framework v4. Includes tools for module generation, db migration, authorization, authentication and more.

SendGrid's Golang HTTP Client for calling APIs
SendGrid's Golang HTTP Client for calling APIs

Quickly and easily access any RESTful or RESTful-like API. If you are looking for the SendGrid API client library, please see this repo. Announcements

GoPrisma - A Go wrapper for prisma to turn databases into GraphQL APIs using Go.

GoPrisma - a Go wrapper for the Prisma Engines What's this? Introspect a database and use it as a GraphQL API using Go. Supported Databases: SQLite Po

It is POC to create web apis using golang

Web API using golang It is POC to create web apis using golang. It is not using a good architecture like hexagonal archicture. But, it contains a CRUD

⚓️ Golang RESTful APIs

Golang RESTful Golang RESTful API started on January 23rd, 2022. 环境配置相关解决办法

Releases(v0.0.6)
  • v0.0.6(Feb 21, 2022)

    Breaking Changes from v0.0.5 -> v0.0.6 !

    • Now has support for 2 go frameworks -> Gin and Fiber
    • refactored predefined responses to be a single function to which the status is passed as an int
    • Removed functions that return API messages
    • Added bash script to test for errors
    Source code(tar.gz)
    Source code(zip)
  • v0.0.5(Feb 6, 2022)

    Added

    • optional SQLC support
    • correct conversion to plural for module_name
    • .gitignore in the root of init server
    • helmet middleware enabled by default
    Source code(tar.gz)
    Source code(zip)
  • v0.0.1(Jan 11, 2022)

Owner
null
Go Fiber Boilerplate with Gorm ORM

Go Fiber Boilerplate with Gorm ORM This boilerplate app is using Go version 1.17 because I think for now this is the most updated release. Installatio

Muhammad Iqbal 2 Jul 30, 2022
A REST web-service sample project written in Golang using go-fiber, GORM and PostgreSQL

backend A REST web-service sample project written in Golang using go-fiber, GORM and PostgreSQL How to run Make sure you have Go installed (download).

Omid Hojabri 26 Sep 5, 2022
Go WhatsApp REST API Implementation Using Fiber And Swagger

Go WhatsApp REST API Implementation Using Fiber And Swagger Package cooljar/go-whatsapp-fiber Implements the WhatsApp Web API using Fiber web framewor

Mohammad Fajar Rizky 9 May 9, 2022
Go fiber simple rest API

Go Fiber Gorm CRUD Example Go 1.17 Fiber v2 Gorm with sqlite database driver Swa

Sarawutt Bureekeaw 6 Jul 15, 2022
Rest API Template [GO + Fiber + Mongo]

GoFiber MongoDB Rest API Template Feature: Full CRUD REST API MongoDB native driver; no use of orm/odm How to structure a production ready API (Model/

THONGCHAI SOMTUA 0 Jan 6, 2022
REST api using fiber framework written in golang and using firebase ecosystem to authentication, storage and firestore as a db and use clean architecture as base

Backend API Example FiberGo Framework Docs : https://github.com/gofiber Info This application using firebase ecosystem Firebase Auth Cloud Storage Fir

Atilla Pehlivan 3 May 31, 2022
REST API boilerplate built with go and clean architecture - Echo Framework

GO Boilerplate Prerequisite Install go-migrate for running migration https://github.com/golang-migrate/migrate App requires 2 database (postgreSQL an

Syahid Firdaus 9 Sep 22, 2022
An restful api that uses CRUDL to support user endpoints. Stores the users in mysqlite. Creates 10 users when the program starts.

UserAPI An restful api that uses CRUDL to support user endpoints. Stores the users in mysqlite. Creates 10 users when the program starts. How to start

Nazar Trut 0 Nov 26, 2021
REST Layer, Go (golang) REST API framework

REST Layer REST APIs made easy. REST Layer is an API framework heavily inspired by the excellent Python Eve. It helps you create a comprehensive, cust

Olivier Poitrey 1.2k Sep 20, 2022
A list of modules useful for using with fiber

Fiber Modules A list of modules useful for using with fiber Install go get github.com/gkampitakis/fiber-modules Contents healthcheck Local Development

Georgios Kampitakis 3 Sep 27, 2022