shochu/demo.sh

26 lines
304 B
Bash
Raw Normal View History

2022-01-09 18:38:22 +00:00
#!/bin/bash
. base.sh
2022-01-09 19:19:58 +00:00
. mysql.sh
. credentials.sh
connect "$mysqlHost" "$mysqlUser" "$mysqlPassword" "$mysqlDB"
2022-01-09 18:38:22 +00:00
route GET / index
index() {
endHeaders
2022-01-09 19:19:58 +00:00
echo "Users:"
echo "SELECT * FROM users" | query | getColumns 2
2022-01-09 18:38:22 +00:00
}
route GET /debug debug
debug() {
endHeaders
echo "$pathInfo"
set
}
router