Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: lein-fleetdb plugin #3

Open
hyp3rvigi1ant opened this issue Jan 29, 2010 · 2 comments
Open

Feature request: lein-fleetdb plugin #3

hyp3rvigi1ant opened this issue Jan 29, 2010 · 2 comments
Labels

Comments

@hyp3rvigi1ant
Copy link

It would be nice to start the fleetdb server by just running a lein command:

$ lein fleetdb

And possibly have fleetdb parameters in the developer's project.clj file. Maybe something like this:

(defproject demo/demo "1.0.0-SNAPSHOT"
    :description "FIXME: write"
    :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"]
        [org.clojure/clojure-contrib "1.0-SNAPSHOT"]
        [swank-clojure "1.1.0"]
        [fleetdb "0.1.1-SNAPSHOT"]
        [fleetdb-client "0.1.1-SNAPSHOT"]]
    :dev-dependencies [[leiningen/lein-swank "1.1.0"]]
    :fleetdb-logfile "demo.fdb"
    :fleetdb-port 3401)

And maybe even allow the developer to use lein to start the server with optional parameters to override the fleetdb settings in project.clj:

$ lein fleetdb -a 10.10.0.17 -p 3402

Then people won't have to type long commands or write their own scripts to start the server. If I get time and no one has created this yet, I might look into doing it myself (I don't think it would be much more complicated than the lein-swank plugin).

@mmcgrana
Copy link
Owner

I like the idea of being able to specify a "configuration file", but I don't want to combine server configuration and booting with dependency specification and the build system.

So if you were going to write a patch along these lines, I'd suggest that you add a "-c" command line option that took the location of a configuration file, which would be read, evaled, and return a Clojure map. These configuration values would then be c.c./merge'd with any overrides / additions specified on the command line to give the boot configuration.

That would solve the issue of the command line flag verbosity, but not of the JVM startup verbosity, e.g. "java [jvm-opts] -cp fleetdb-standalone.jar fleetdb.server". I think this is an orthogonal issue and am open to ideas on how to solve it.

@hyp3rvigi1ant
Copy link
Author

Very good points I hadn't considered!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants