Skip to content
/ wape Public

Wape is a microservice that has 2 different apps

Notifications You must be signed in to change notification settings

metecan/wape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WAPE Microservice

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

✨ Installation

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

✨ Running the apps

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

✨ Usage

If all containers are up and running, you can use the following steps to upload files to the bucket

  1. Open Postman or any other REST client
  2. 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)
  1. Send a POST request to the following URL: http://localhost:8000/page or http://127.0.0.1:8000/page
  2. Select files using multipart/form-data with the file prefix
  • (You can upload multiple files at once)

  • Example for uploading a file:

example1

  1. Send the request
  2. Check the response

If it is working, you can see the message like the following message:

example2

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

example3

✨ Used technologies

  • Beanstalkd
  • Postgres
  • Docker
  • Gofiber
  • Godotenv
  • Supabase Storage for S3 Bucket

✨ Folder structure

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