description | ELECTRONIC VOTE REST API (school project) |
owner | as2023.mta5x@slmail.me |
last change | Wed, 27 Sep 2023 16:50:03 +0000 (27 13:50 -0300) |
URL | git://repo.or.cz/asis-2023-electronic-vote.git |
https://repo.or.cz/asis-2023-electronic-vote.git | |
push URL | ssh://repo.or.cz/asis-2023-electronic-vote.git |
https://repo.or.cz/asis-2023-electronic-vote.git (learn more) | |
bundle info | asis-2023-electronic-vote.git downloadable bundles |
content tags |
POST /candidates {"name":string} -> {"id":number,"name":string}
DELETE /candidates/id
GET /candidates -> [{"id":number,"name":string}]
DELETE /candidates
POST /vote {"id":number}
GET /report -> [{"id":number,"name":string,"votes":number}]
Primero hay que instalar sqlite.
En mi caso (termux), el comando para instalar SQLite es:
$ pkg install sqlite
Controlar que SQLite esté habilitado en PHP.
$ php -i | grep -i 'sqlite' | grep -i 'ena'
PDO Driver for SQLite 3.x => enabled
SQLite3 support => enabled
Crear la base de datos con el siguiente comando:
$ sqlite3 database.sqlite < votar.sql
En la siguiente página se puede aprender un poco más sobre SQLite: SQLite PHP.
6 months ago | grupo4 | logtree |
6 months ago | grupo1 | logtree |
6 months ago | grupo3 | logtree |
6 months ago | grupo5 | logtree |
6 months ago | grupo6 | logtree |
6 months ago | grupo2 | logtree |
6 months ago | grupo_1 | logtree |
6 months ago | grupo5ac | logtree |
6 months ago | master | logtree |
7 months ago | juan_00_diagramas | logtree |
7 months ago | juan_06_get_report | logtree |
7 months ago | juan_05_post_vote | logtree |
7 months ago | juan_04_delete_candidates | logtree |
7 months ago | juan_03_get_candidates | logtree |
7 months ago | juan_01_post_candidates | logtree |
7 months ago | juan_02_delete_candidates_id | logtree |