A collection of APIs, Microservice and Web Apps in general using Go
A web app build with go
, websockets
, and htmx
to show realtime device info.
Info is read using the using the gopsutil
Clone this repo and cd
into the project directory
$ git clone https://github.com/ecabigting/letsgo-brrr.git
$ cd kanbanapi
Run the app by executing
$ go run ./cmd
Open a browser and visit the URL: http://localhosts:<port>
The UI is build with bootstrap
A simple rest api
with xata a postgresql
database
Clone this repo and cd
into the project directory
$ git clone https://github.com/ecabigting/letsgo-brrr.git
$ cd kanbanapi
Create your .env
file in the root directory kanbanapi/
and add the following:
#.env
XATA_PSQL_URL=
JWT_TOKEN_SECRET=
- Set the your
postgresql
url toXATA_PSQL_URL
in my case I am usingxata
as my database - Set your chosen secret to
JWT_TOKEN_SECRET
Run the project with:
go run ./
Alternatively you can use air
for hot reload module. You can install air
by following these instructions
You can interact with the API using your favorite endpoints by using the following URLS:
/
the root URL/register
aPOST
request to register a user and returns an access token/login
aPOST
to login a registered user and returns an access token/projects
aGET
request returns all projects owned by the requesting user, required an access token in theAuthorization
header/projects/{xata_id}
aGET
request that returns the project the of the givenxata_id
, project must be owned by the requesting user, required an access token in theAuthorization
header/projects/{xata_id}
aPUT
request to update the project related to the givenxata_id
, required an access token in theAuthorization
header/projects
aPOST
request to create a new project, required an access token in theAuthorization
header at-/projects/{xata_id}
aDELETE
request to delete a project related to the givenxata_id
, required an access token in theAuthorization
header
Check the
/kanbanapi/request-endpoints
for the collection of request endpoints with body