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.
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
Run the following command to start the server:
reflex -c .reflex
The server will run on http://localhost:8080 by default
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:
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.