Wape is a microservice that has 2 different apps that allow you to upload your files to the bucket and insert them into DB them after parsing
First, need to clone the repository
HTTPS
clone
git clone https://github.com/metecan/wape.git
SSH
clone
git clone git@github.com:metecan/wape.git
Starting docker compose to run the apps
make up
OR
docker compose up --build
Everything will be up and running.
If you want to all the apps down, just run
make down
OR
docker compose down
Every container will be downed
If all containers are up and running, you can use the following steps to upload files to the bucket
- Open Postman or any other REST client
- Enter the following URL: http://localhost:8000/ or http://127.0.0.1:8000/
- (If it is working, you can see the following message: "Wape API is alive" and the status code is 200)
- Send a POST request to the following URL: http://localhost:8000/page or http://127.0.0.1:8000/page
- Select files using multipart/form-data with the
file
prefix
-
(You can upload multiple files at once)
-
Example for uploading a file:
- Send the request
- Check the response
If it is working, you can see the message like the following message:
File upload is successful.
Then you can use the following steps to insert the files into the DB
Send a GET request with REST client to the following URL: http://localhost:8001/ or http://127.0.0.1:8001/ Then parser will be triggered to parse the files and insert them into the DB
or you can use terminal to run the following command:
curl http://localhost:8001/
If everything is working, you can check the database to see the parsed file data
- Beanstalkd
- Postgres
- Docker
- Gofiber
- Godotenv
- Supabase Storage for S3 Bucket
WAPE
│
├── docker-compose.yml
├── Makefile
├── .gitignore
├── README.md
├── api/
│ ├── handler/
│ ├── helper/
│ ├── routes/
│ ├── test/
│ ├── utils/
│ ├── main.go
│ ├── Dockerfile
│ ├── .gitignore
│ ├── go.mod
│ ├── go.sum
│ └── .env
├── parser/
│ ├── db/
│ ├── handler/
│ ├── helper/
│ ├── main.go
│ ├── Dockerfile
│ ├── .gitignore
│ ├── go.mod
│ ├── go.sum
│ └── .env
✨ Last Update: 2022 June 03