jokes-bapak2/api
Reinaldy Rafli 02e9289058 docs: updated 2021-07-15 19:44:07 +07:00
..
app/v1 feat: health now checks databases 2021-07-15 12:55:28 +07:00
.dockerignore build: config 2021-07-15 02:13:30 +07:00
.gitignore feat: nearly finished 2021-07-09 19:13:19 +07:00
Dockerfile build: config 2021-07-15 02:13:30 +07:00
README.md docs: updated 2021-07-15 19:44:07 +07:00
go.mod feat: working app 2021-07-15 01:17:01 +07:00
go.sum feat: working app 2021-07-15 01:17:01 +07:00
main.go feat: working app 2021-07-15 01:17:01 +07:00

README.md

Jokes Bapak2 API

Still work in progress

Development

# Install modules
$ go mod download
# or
$ go mod vendor

# run the local server
$ go run main.go

# build everything
$ go build main.go

Used packages

Name Version Type
gofiber/fiber v2.14.0 Framework
jackc/pgx v4.11.0 Database
go-redis/redis v8.11.0 Cache
joho/godotenv v1.3.0 Config
getsentry/sentry-go v0.11.0 Logging
aldy505/phc-crypto v1.1.0 Utils
Masterminds/squirrel v1.5.0 Utils
aldy505/bob v0.0.1 Utils
gojek/heimdall v7.0.2 Utils

Directory structure

.
├── app
│  └── v1
│     ├── app.go        - v1 application entry point
│     ├── handler       - Route handler
│     ├── middleware    - App middleware handler
│     ├── models        - Output and input schema
│     ├── platform
│     │  ├── cache      - In-memory cache setup functions
│     │  └── database   - Database setup functions
│     ├── routes        - Routes definition & assignment
│     └── utils         - Utility functions
├── Dockerfile          - Docker image for API
├── go.mod              - Module information & dependencies
├── go.sum              - Packages lock file
├── main.go             - Application entry point
└── README.md           - You are here

.env configuration

ENV=development
PORT=5000

DATABASE_URL=postgres://postgres:password@localhost:5432/jokesbapak2
REDIS_URL=redis://@localhost:6379

SENTRY_DSN=