| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Adds the new -dsn flag so that the user can pass any database into the
program.
Adds a new function that wraps sql.Open() to create the connection pool,
and pings it to ensure it is alive.
|
|
|
|
|
|
|
|
|
| |
Accepts -addr for the port.
Commented out flag for dsn (database string) - not yet implemented.
See https://github.com/go-sql-driver/mysql#dsn-data-source-name for the
correct format to be used for MySQL/MariaDB.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We need a script to run for populating and bootstrapping the database.
This is the start of such a script.
The syntax here is suitable for mariadb at present.
The comments above "populate" are assumed to have been carried out by
the root user (e.g. sudo mariabdb).
|
|
|
|
|
| |
Added a partial html for the navigation bar. So far it just has a link
to "Home" on it.
|
|
|
|
|
|
| |
There is also some basic CSS here.
Also introduced a proper structured logger.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Started to separate out funtionality: added an application struct and
several methods (routes(), home() and a notFound() error).
At the moment, the application struct does not carry any other
configuration objects or a database pool connection - it is just there
to get the routing going.
|
|
|
|
| |
I don't want to have to remember docker commands ever again!
|
| |
|
|
|