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
- Clone the repository
$ git clone https://github.com/joaorfp/GO-api.git
$ cd GO-api/
- Initialize the Go module
$ go mod tidy
- Run the API
$ go run cmd/main.go
Sample API Requests
- Create a User
$ curl -X POST -H "Content-Type: application/json" -d '{"username": "johndoe", "email": "[email protected]"}' http://localhost:8000/users
- 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
- Get All Users
$ curl -X GET http://localhost:8000/users
- Get All Bank Accounts
$ curl -X GET http://localhost:8000/bankAccounts
# Packages
No description provided by the author