summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Adds the database driver and opens database poolMatthew Lemon2024-02-091-4/+36
| | | | | | | | 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.
* Adds flagsMatthew Lemon2024-02-092-3/+11
| | | | | | | | | 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.
* Adds my-sql driver dependencyMatthew Lemon2024-02-092-0/+4
|
* Adds a populate.sql scriptMatthew Lemon2024-02-092-0/+31
| | | | | | | | | | 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 nav partialMatthew Lemon2024-02-083-3/+8
| | | | | Added a partial html for the navigation bar. So far it just has a link to "Home" on it.
* Created a /organisations/list routeMatthew Lemon2024-02-087-5/+91
| | | | | | There is also some basic CSS here. Also introduced a proper structured logger.
* First proper use of templatesMatthew Lemon2024-02-083-3/+14
|
* First appearance of HTML on the home pageMatthew Lemon2024-02-082-1/+46
|
* Moved main to cmd/web and added routes() methodMatthew Lemon2024-02-085-19/+46
| | | | | | | | | 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.
* Adds a MakefileMatthew Lemon2024-02-081-0/+8
| | | | I don't want to have to remember docker commands ever again!
* Adds DockerfileMatthew Lemon2024-01-311-0/+8
|
* Initial commit for testingMatthew Lemon2024-01-312-0/+21