Skip to content

A RESTful API built using Golang, Fiber, MongoDB Driver, MongoDB, and Reflex.

Notifications You must be signed in to change notification settings

dipo0x/Golang-Post-Api

Repository files navigation

Go-fiber post API

Introduction

This is a RESTful API built using Golang, Fiber, MongoDB Driver, MongoDB, and Reflex. This API provides a simple CRUD implementation to get, create, update, and delete posts.


Setup

Clone the repository to your local machine.

git clone https://github.com/dipo0x/golang-post-api

Ensure that you have Golang and MongoDB installed on your machine. Alternatively, you can use MongoDB Cloud Atlas

Navigate to the root directory of the project in a terminal.

cd golang-post-api

Run the following command to install the necessary dependencies

go install

After that, run this command to create a .env file with which youcan get started with.

bash setup.sh

Running Server

Locally

Run the following command to start the server:

reflex -c .reflex
Screenshot 2024-11-08 at 4 50 46 PM

The server will run on http://localhost:8080 by default


Available Endpoints

Base URL[dev]: 0.0.0.0:8080/\

When your server is running, call the base endpoint to ensure it is up, and you will receive a response like this:

Screenshot 2024-11-08 at 4 25 34 PM

Conclusion

You can find additional documentation for this API, including request and response signatures, by visiting https://documenter.getpostman.com/view/17975360/2sAY52beNV in your web browser.

About

A RESTful API built using Golang, Fiber, MongoDB Driver, MongoDB, and Reflex.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published