A simple social media application according to the category you want to submit, which has 2 ADMIN and MEMBER levels.
Tutorial Install Thread Mini Apps with Golang, don't forget to setting .env (change name file .env_example)
git clone https://github.com/c0rz/Thread-Mini-App.git
cd Thread-Mini-App
go get
go run main.go
To run this project, you will need to add the following environment variables to your .env file, example in file .env_example
POST /api/auth/login
Request | Type | Description |
---|---|---|
email |
string |
Required, Format Email. Email Address |
password |
string |
Required. Password |
POST /api/auth/register
Request | Type | Description |
---|---|---|
name |
string |
Required. Full Name |
email |
string |
Required, Format Email. Email Address |
password |
string |
Required. Password |
POST /api/thread/send
Request | Type | Description |
---|---|---|
title |
string |
Required. Title Thread |
text |
string |
Required. Body Thread |
category_id |
string |
Required. Category ID |
GET /api/thread
PUT /api/thread/:id
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. ID Thread |
DELETE /api/thread/:id
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. ID Thread |
GET /api/thread/:id
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. ID Thread |
POST /api/thread/:id
Parameter | Type | Description |
---|---|---|
id_post |
integer |
Required. ID Thread |
comment |
text |
Required. Comment |
POST /admin/category/add
Parameter | Type | Description |
---|---|---|
name |
string |
Required. Name Category |
DELETE /admin/category/:id
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. ID Category |
Database: PostgreSQL
Server: Golang, Gin, sql-migrate