Package cooljar/go-whatsapp-fiber Implements the WhatsApp Web API using Fiber web framework,
and also Swag to generate Swagger Documentation (2.0).
This repository contains example of implementation Rhymen/go-whatsapp package.
These instructions will get you a copy of the project up and running on docker container and on your local machine.
Prequisites package:
- Docker - for developing, shipping, and running applications (Application Containerization).
- Go - Go Programming Language
- Swag - converts Go annotations to Swagger Documentation 2.0
- Make - Automated Execution using Makefile
Optional package:
- gosec Golang Security Checker. Inspects source code for security problems by scanning the Go AST
- Rename
.env.example
to.env
- fill it environment with your make setting.
- Run project by using following command:
$ make run
# Process:
# - Generate API docs by Swagger
# - Build and run Docker containers
- Stop application by using following command:
$ make stop
# Process:
# - Stop and remove app container
# - remove image
- Run Container without Rebuid by using following command:
$ make docker_run_image
# Process:
# - Run Docker containers, if image not found will build image
Below is the instructions to run this project on your local machine:
- Open new
terminal
. - Set
run.sh
file permission.
$ chmod +x ./run.sh
- Run application from terminal by using following command:
$ ./run.sh
Go to your API Docs page: 127.0.0.1:3000/swagger/index.html and fill Basic Auth with BASIC_AUTH_USERNAME
and BASIC_AUTH_PASSWORD
, let BASIC_AUTH_USERNAME
and BASIC_AUTH_PASSWORD
empty if you want without basic auth
API Docs page will be look like:
Below is the instructions to perform messaging:
- Make sure your computer is connected to the internet.
- Prepare your smartphone and make sure the internet is active.
- Hit the Login endpoint, you will see a QR Code if request was success.
Check your.env
environment setting if an error occurred. - Scant it, and done. Now you can perforn all endpoint to send a message.
- Inspects source code for security problems using gosec. You need to install it first.
- Execute unit test by using following command:
$ make test
- Go - Go Programming Languange
- Go Modules - Go Dependency Management System
- Make - GNU Make Automated Execution
- Docker - Application Containerization
- Fajar Rizky - Initial Work - cooljar
- Ahmad Yusri - Reconfig - ahmadyusri