Giter Club home page Giter Club logo

create-go-mongodb-template's Introduction

Logo

Go lang (gin-gonic) and MongoDB API Template

An efficient CLI starter template to kickstart your Go lang project using the Gin framework and MongoDB, enabling you to rapidly develop RESTful APIs.
Explore the docs »

View Demo · Report Bug · Request Feature

About The Project

Within this repository, you will find a fully configured and ready-to-use Go lang web application designed for building APIs. The project is built using the Gin framework and integrates with MongoDB, providing a solid foundation for developing scalable and performant APIs.

Here's why:

  • Routing & Middleware:

    • ✔️ Gin for efficient routing and middleware support
  • Database Integration:

    • 📦 MongoDB as the database for modern applications
    • 💾 MongoDB driver for Go for seamless integration
  • Development Workflow:

    • 🔄 Live reload for efficient development
    • 🛠 Optimized code for production
  • Security Measures Added:

    • 🔒 Input validation to prevent common security vulnerabilities
    • 🚧 Rate limiting to protect against brute-force attacks
    • 🌐 CORS (Cross-Origin Resource Sharing) configured for secure API usage

Of course, this template may not cover all project needs, as your requirements may vary. More updates will be added in the future. Feel free to suggest changes by forking this repo, creating a pull request, or opening an issue. Thanks to all contributors who have helped enhance this template!

(back to top)

Built With

This section highlights the key frameworks and libraries that form the foundation of your project. Below are some notable examples:

  • Go: An open-source programming language that makes it easy to build simple, reliable, and efficient software.
  • Gin: A web framework written in Go (Golang). It features a Martini-like API with much better performance.
  • MongoDB: The database for modern applications.
  • MongoDB Go Driver: The official MongoDB driver for Go.

(back to top)

Getting Started 🚀

Prerequisites

Before you begin contributing to this project, make sure you have the following set up:

  • Go: Go Lang.
  • Gin: gin-gonic.

Run This ⌨️

  1. Clone the Repository:

    git clone https://github.com/BoBsRepository/create-go-mongodb-template.git
  2. Add Environment Variables:

     cd create-go-mongodb-template
     touch .env
  3. Add the necessary configuration:

    MONGOURI = <your-mongodb-uri>
    JWT = KSNVLJDSBJVSDJLVNLKSDVNLKSDVVKMLSDMKDSNKLVDSNKLVNDSKLVDJK #your jwt secret
  4. Fetch the Dependencies

    go get
  5. Build the Project:(optional)

    The go build command is used in Go to compile and build a Go program. It creates an executable binary from the source code.

    go build
  6. Run the Project:

    Now you can run that executable file or main.go file

    ./your-gin-executable

    or

    go run main.go

    (back to top)

Contributing 🌟

Making Contributions

We welcome and appreciate contributions from the community ❤️! Here's how you can contribute:

  • Open Issues: Check for open issues or create a new one to start discussions.
  • Fork the Repository: Fork the project to your own GitHub account.
  • Create Pull Request: Make changes in your fork and submit a pull request.

Welcome Contributors!

🚀 Thank you for considering contributing to this project! Your involvement makes this template even better. Feel free to explore the code, share your ideas, and make improvements ✌️.

🌟 Don't hesitate to reach out if you have any questions or need assistance. Together, let's make this project amazing!🟩

(back to top)

create-go-mongodb-template's People

Contributors

puskar-roy avatar

Watchers

 avatar

Forkers

puskar-roy

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.