Skip to content

Ramonmelod/servidor-mario

Repository files navigation

Mario Server

express logo postgresql logo

Technologies used:

  • Express
  • Postgres
  • Node

Description:

  • This Node-Express API queries and posts to a MySQL database with the purpose of querying and registering record holders for the Mario game implemented in jogoMario

Endpoints

POST

/

{
  "i_idrecordista_listarecordistas": 50,
  "s_nome_listarecordistas": "Fulano",
  "i_pontuacao_listarecordistas": 25
}
  • Example of a request using Curl:
curl -X POST http://localhost:8080/ -H "Content-Type: application/json" -H "Referer: https://ramonmelo.com.br/" -d '{"nome": "Fulano", "pontuacao": 42}'

GET

Requisição

/

curl -s http://localhost:8080/ | python3 -m json.tool

Direct acces to the database container

  • In ubuntu you can access the postgres database container using the comand:
  psql --host=localhost --username=postgres --port=5432
  • After this command the database shell request the password, which is:local_password

Author

Releases

No releases published

Packages

 
 
 

Contributors