module
Version:
v0.0.0-...-e970dd6
Opens a new window with list of versions in this module.
Published: Apr 3, 2022
License: Apache-2.0
Opens a new window with license information.
README
¶
TODO App
A simple TODO app to practice GraphQL using go. The app can be run with the following databases,
- Postgresql
- Mariadb/MySql
- Sqlite
- Docker for Desktop
- Golang >= v1.18
Application Configuration
Variable Name |
Description |
Default Value |
BUNDEBUG |
The debug mode for bun |
2 - log all queries |
BUN_SCHEMA_GEN_MODE |
Schema Generation mode |
drop-and-create |
TODOS_DB_FILE |
The db file for sqlite |
$PWD/work/todos.db |
TODO_DB_TYPE |
The database to use.Valid values sqlite,postgresql,mariadb or mysql |
sqlite |
PGPASSWORD |
Postgresql User password |
postgres |
PGUSER |
Postgresql User |
postgres |
PGPORT |
Postgresql Port |
5432 |
PGHOST |
Postrgesql Host |
localhost |
PGDATABASE |
Postgresql database |
postgres |
PGSSLMODE |
Use SSL |
disable |
MARIADB_ROOT_PASSWORD |
mariadb root password |
root |
MARIADB_HOST |
mariadb host |
localhost |
MARIADB_PORT |
mariadb port |
3306 |
MARIADB_USER |
mariadb user |
root |
MARIADB_PASSWORD |
mariadb user password |
root |
MARIADB_DATABASE |
mariadb database |
demodb |
Start Database Services
$SOURCE_ROOT/docker-compose up
Run the app
go run cmd/app
You can access the graphql console from url http://localhost:8080/
Some example queries/mutations are in ./graphql_ops.txt
Directories
¶
cmd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.