Skip to content

ZeyadSultan/flapKap

Repository files navigation

FlapKap Task

First:

  • clone your project to your machine

Second:

  • open your project in intellij or your preferred ide

Third without Docker:

  • Create database on your machine and set the database values in the application.properties
  • Run the application
  • Insert the two roles in your database before any calling to any api INSERT INTO flapkaptask.role (id, name) VALUES ('1', 'ROLE_BUYER');

INSERT INTO flapkaptask.role (id, name) VALUES ('2', 'ROLE_SELLER');

Third with docker

  • open the terminal and run those commands
  • cd to the project directory
  • docker-compose up -d
  • docker exec -it postgres bash
  • psql -U (username) zeyad
  • CREATE DATABASE flapkap;
  • \c flapkap
  • INSERT INTO role (id,name) VALUES (1,'ROLE_BUYER');
  • INSERT INTO role (id,name) VALUES (2,'ROLE_SELLER');

Examples

Example on an endpoint to signup a user

Sign up

Example on an endpoint to create a product and the user is a seller

create product example

Example on an endpoint to deposit coins and the user is a buyer

deposit coins

Example on an endpoint to buy product and the user is a buyer

buy product

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages