jokes-bapak2/api
Reinaldy Rafli 8c235623c5 test: new cases for validator and joke pkg 2021-11-07 00:45:18 +07:00
..
core test: new cases for validator and joke pkg 2021-11-07 00:45:18 +07:00
handler test: new cases for validator and joke pkg 2021-11-07 00:45:18 +07:00
middleware refactor: directory structure 2021-10-30 10:24:53 +07:00
platform/database refactor: configuring context and moving logic to its designated directory 2021-11-01 19:32:33 +07:00
routes refactor: directory structure 2021-10-30 10:24:53 +07:00
utils refactor: directory structure 2021-10-30 10:24:53 +07:00
.dockerignore build: config 2021-07-15 02:13:30 +07:00
.env.example build: setup docker compose 2021-07-16 02:21:22 +07:00
.gitignore build: setup docker compose 2021-07-16 02:21:22 +07:00
Dockerfile fix: verification cleanup 2021-09-28 11:29:39 +07:00
README.md refactor: swap package, clean up, added test 2021-07-18 12:28:24 +07:00
documentation.json fix: adjusting database transactions 2021-09-27 17:10:19 +07:00
documentation.yaml fix: adjusting database transactions 2021-09-27 17:10:19 +07:00
favicon.png refactor: directory structure 2021-10-30 10:24:53 +07:00
go.mod refactor: move everything to their own packages 2021-10-18 15:31:17 +07:00
go.sum refactor: move everything to their own packages 2021-10-18 15:31:17 +07:00
main.go refactor: configuring context and moving logic to its designated directory 2021-11-01 19:32:33 +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

There is a placeholder data ready for you to query it manually in /app/v1/platform/database/placeholder.sql. Have a good time developing!

Used packages

Name Version Type
gofiber/fiber v2.14.0 Framework
jackc/pgx v4.11.0 Database
go-redis/redis v8.11.0 Cache
patrickmn/go-cache v2.1.0+incompatible 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
georgysavva/scany v0.2.9 Utils
stretchr/testify v1.5.1 Tests

Directory structure

.
├── app
│  └── v1
│     ├── app.go        - v1 application entry point
│     ├── core          - Pure business logic
│     ├── 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=