Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Conf file from CLI, and more ideas.

  • Loading branch information...
commit 760a61822b92047503f31e13de85467e45b36afe 1 parent f33ecf7
@nicolasff authored
Showing with 8 additions and 6 deletions.
  1. +2 −2 README.markdown
  2. +6 −4 turnip.c
View
4 README.markdown
@@ -25,13 +25,13 @@ curl -d "GET/hello" http://127.0.0.1:7379/
# Ideas, TODO...
* Add meta-data info per key (MIME type in a second key, for instance).
-* Support PUT, DELETE, HEAD? How? For which commands?
+* Support PUT, DELETE, HEAD, OPTIONS? How? For which commands?
* Support pub/sub (waiting for HiRedis ticket \#17 in order to add this.)
* MULTI/EXEC/DISCARD/WATCH are disabled at the moment; find a way to use them.
* Add logging.
* Enrich config file:
* Provide timeout (this needs to be added to hiredis first.)
-* Get config file path from command line.
+* Multi-server support, using consistent hashing.
* Send your ideas using the github tracker or on twitter [@yowgi](http://twitter.com/yowgi).
# HTTP error codes
View
10 turnip.c
@@ -50,14 +50,16 @@ on_request(struct evhttp_request *rq, void *ctx) {
int
main(int argc, char *argv[]) {
- (void)argc;
- (void)argv;
struct server *s = calloc(1, sizeof(struct server));
s->base = event_base_new();
struct evhttp *http = evhttp_new(s->base);
-
- s->cfg = conf_read("turnip.json");
+
+ if(argc > 1) {
+ s->cfg = conf_read(argv[1]);
+ } else {
+ s->cfg = conf_read("turnip.json");
+ }
/* ignore sigpipe */
#ifdef SIGPIPE

0 comments on commit 760a618

Please sign in to comment.
Something went wrong with that request. Please try again.