fukamachi / caveman

Lightweight web application framework for Common Lisp.
http://8arrow.org/caveman/
776 stars 62 forks source link

Project `:mode` and `:database-connection-spec` #23

Open vityok opened 10 years ago

vityok commented 10 years ago

Could somebody please clarify if project configuration is really parsed, especially the :database-connection-spec parameter.

As far as I understand the only information that has any sort of impact is:

log-path, application-root, port, server

and probably some others. However, I could not trace any usage of the :database-connection-spec parameter. The CLSQL Middleware module uses connection-spec parameter and its default value is "memory" (without :, meaning that it is a file).

Does anybody have this problem with configuration? How to properly configure database-spec of the CLSQL middleware module? How to add new parameters to the configuration?

fukamachi commented 10 years ago

In the first place, configuration is just a property list in Caveman. :mode is for switching configurations.

So, there is no restriction to add new parameters. If you add :database-connection-spec to your config file, you can get its value in the application code by calling (config :database-connection-spec).

CLSQL was used as the default DB module in Caveman before. cf593cbc072e25f26a39eab10b4d1461a9b7f83e might be help you.

vityok commented 10 years ago

The changeset is exactly what I was looking for. The problem is that the documentation in README is a little bit behind the current sources as CLSQL is no longer initialized in the described way per default.

Thanks for pointing this out!

Could you please update the README file to avoid similar confusion in the future?