Categorygithub.com/joaorfp/GO-api
module
0.0.0-20240805154306-0e5dadec1511
Repository: https://github.com/joaorfp/go-api.git
Documentation: pkg.go.dev

# README

Go API Starter Guide

This guide provides instructions to set up and run a basic Go API.

Prerequisites

  • Go installed on your machine (version 1.16 or higher recommended)

Getting Started

  1. Clone the repository
 $ git clone https://github.com/joaorfp/GO-api.git
 $ cd GO-api/
  1. Initialize the Go module
 $ go mod tidy
  1. Run the API
 $ go run cmd/main.go

Sample API Requests

  1. Create a User
 $ curl -X POST -H "Content-Type: application/json" -d '{"username": "johndoe", "email": "[email protected]"}' http://localhost:8000/users
  1. Create a Bank Accont
 $ curl -X POST -H "Content-Type: application/json" -d '{"balance": 1000.50, "invested_balance": 500.00, "user_id": 1}' http://localhost:8000/bankAccounts
  1. Get All Users
 $ curl -X GET http://localhost:8000/users
  1. Get All Bank Accounts
 $ curl -X GET http://localhost:8000/bankAccounts

# Packages

No description provided by the author