This is go simple blog, an app for writing a simple blog.
- Run:
make up
- Make sure you have Go and PostgreSQL installed.
- Change the environment variables accordingly.
- Run:
make run
- Login:
POST /api/auth/login
- Register:
POST /api/auth/register
- Create Post:
POST /api/posts
(Auth required: rolesuser
) - Search Posts by Tag:
GET /api/posts
(Auth required: rolesuser
,admin
) - Update Post:
PUT /api/posts/{id}
(Auth required: rolesuser
,admin
) - Delete Post:
DELETE /api/posts/{id}
(Auth required: rolesuser
,admin
) - Get Post by ID:
GET /api/posts/{id}
(Auth required: rolesuser
,admin
) - Publish Post:
PUT /api/posts/publish/{id}
(Auth required: roleadmin
)
- Blog List:
GET /posts
- Blog Detail:
GET /posts/{id}
- Login Page:
GET /login
- Register Page:
GET /register