diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2022-10-30 01:00:05 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2022-10-30 01:00:05 +0300 |
| commit | c0cb56d3783906606f5002bcf571a5994d07de54 (patch) | |
| tree | 55bff99c116775aba8b5625c9e00e64f952548ab /main.go | |
| parent | (#18) enums for user types (diff) | |
| download | lphub-c0cb56d3783906606f5002bcf571a5994d07de54.tar.gz lphub-c0cb56d3783906606f5002bcf571a5994d07de54.tar.bz2 lphub-c0cb56d3783906606f5002bcf571a5994d07de54.zip | |
implement swagger
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 10 |
1 files changed, 10 insertions, 0 deletions
| @@ -10,8 +10,18 @@ import ( | |||
| 10 | "github.com/joho/godotenv" | 10 | "github.com/joho/godotenv" |
| 11 | "github.com/pektezol/leastportals/backend/database" | 11 | "github.com/pektezol/leastportals/backend/database" |
| 12 | "github.com/pektezol/leastportals/backend/routes" | 12 | "github.com/pektezol/leastportals/backend/routes" |
| 13 | _ "github.com/pektezol/leastportals/docs" | ||
| 13 | ) | 14 | ) |
| 14 | 15 | ||
| 16 | // @title Least Portals Database API | ||
| 17 | // @version 1.0 | ||
| 18 | // @description Backend API endpoints for Least Portals Database. | ||
| 19 | |||
| 20 | // @license.name GNU General Public License, Version 2 | ||
| 21 | // @license.url https://www.gnu.org/licenses/old-licenses/gpl-2.0.html | ||
| 22 | |||
| 23 | // @host localhost:4000 | ||
| 24 | // @BasePath | ||
| 15 | func main() { | 25 | func main() { |
| 16 | if os.Getenv("ENV") == "PROD" { | 26 | if os.Getenv("ENV") == "PROD" { |
| 17 | gin.SetMode(gin.ReleaseMode) | 27 | gin.SetMode(gin.ReleaseMode) |