PLEASE NOTE: I no longer actively maintain this project. Pull requests are welcome, but development has halted and issues are unlikely to gain a response.
Meal Planner (A2 Computing Project)
TO-DO: write a description here
Download & install with:
go get github.com/kierdavis/mealplanner
Run server with:
mealplanner -dbsource 'DBSOURCE'
where DBSOURCE
is a data source identifier of the form:
USER:PASS@tcp(HOST:PORT)/DATABASE
or
USER:PASS@unix(/PATH/TO/SOCKET)/DATABASE
For example, to connect the local 'mealplanner' database with username 'web' and password 'hello123', the data source would be:
web:hello123@unix(/var/run/mysqld/mysqld.sock)/mealplanner
and to connect with the same credentials to a remote database at db.example.net, port 3306 (the default MySQL port):
web:hello123@tcp(db.example.net:3306)/mealplanner
Alternatively to using the -dbsource
flag, the MPDBSOURCE
environment
variable can also be set. The -dbsource
flag overrides the environment
variable. Example:
export MPDBSOURCE='web:hello123@tcp(db.example.net:3306)/mealplanner'
mealplanner
Hosted on GoDoc.
github.com/kierdavis/mealplanner
- Main application commandgithub.com/kierdavis/mealplanner/mpapi
- Implementations of Ajax API callsgithub.com/kierdavis/mealplanner/mpdata
- Data structures and data- processing algorithmsgithub.com/kierdavis/mealplanner/mpdb
- Database interface (abstraction of SQL commands into functions involving the application's data structures)github.com/kierdavis/mealplanner/mphandlers
- Implementations of HTTP request handlersgithub.com/kierdavis/mealplanner/mpresources
- Data files (HTML templates, static web files), and code to locate these at runtime