Skip to content

Api de jojo's bizarre adventure feita com express e mysql

Notifications You must be signed in to change notification settings

isaias-silva/jojoapi

Repository files navigation

jojoapi

⚙️ stacks ⚙️

usage

instalation

config a .env file:

PORT=port of api
SECRET="secret for sessions"
DB_PASSWORD="DATABASE PASSWORD"

ADM_PASS="ADM PASS" ADM_NAME="ADM NAME" ADM_MAIL="ADM@MAIL"

init the containers of application with docker compose:

docker-compose up

insert in database the stands info:
in Linux: (check the container name)

   bash migrate.sh
   
in Windows:
docker cp ./sql/inserts.sql container-name:./inserts.sql

docker exec -it container-name mysql -u root -p --execute 'source ./inserts.sql';

requests:

const url = 'apiurl/stands/get'

fetch(url).then((res) => { return res.json() }).then((data) => {}

  • stand name
  • user
  • stand picture
  • stand color
  • atributes of hexagonal graph

⚙️ examples ⚙️

x & y in Canvas for atributes of hexagonal graph

A B C D E
POWER 150,35 150,45 150,55 150,60 150,70
SPEED 220,55 200,60 185,65 175,70 160,70
RANGE 220,95 200,90 195,85 170,85 160,80
DURABILITY 150,112 150,105 150,100 150,90 150,85
PRECISION 85,95 100,90 110,85 115,75 140,80
POTENTIAL 80,55 100,60 110,65 130,60 140,70