rename main.c to exmaple.c

This commit is contained in:
overflowerror 2017-01-02 17:39:42 +01:00
parent 3b6a9ba3bb
commit a62ed13e16
3 changed files with 8 additions and 8 deletions

View file

@ -17,14 +17,14 @@ all: test
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
test: main.o webserver.o help.o
exmaple: exmaple.o webserver.o help.o
$(CC) $(LDFLAGS) -o $@ $^
main.o: main.c webserver.h
exmaple.o: exmaple.c webserver.h
help.o: help.c help.h
webserver.o: webserver.c webserver.h help.h
clean:
rm -f *.o test
rm -f *.o example

View file

@ -12,7 +12,7 @@ Because W for web... Get it? ... Well next time I'll ask you for a catchy name,
### Is this ... thing ... even finished?
No. There are many functions missing and the code needs some revision (and comments I suppose).
There is a working mode though (see [the main file](main.c) for an example).
There is a working mode though (see [example.c](example.c) for an example).
If you want to help me with this project, feel free to fork and submit-pull requests.
I also appreciate opinions, suggestions and complaints.
@ -22,7 +22,7 @@ Both, I guess. Although as I'm thinking about it, it might actually be more of a
### Okay...? So, how can I use this thing?
See [the main file](main.c).
See [exmaple.c](example.c).
Basically you need at least one handler.
```c

View file

@ -29,12 +29,12 @@ int main(int argc, char** argv) {
help_init(NULL, "test");
handle_t hello_handle = {
.host = NULL,
.host = ANY,
.path = "/world",
.handler = &hello_world
};
handle_t test_handle = {
.host = NULL,
.host = ANY,
.path = "/test",
.handler = &test
};
@ -45,7 +45,7 @@ int main(int argc, char** argv) {
.loglevel = LOG_DEBUG
};
webserver_t server = ws_create("test_server", NULL, "8080", stderr, options);
webserver_t server = ws_create("test_server", NULL , "8080", stderr, options);
ws_handle_add(&server, hello_handle);
ws_handle_add(&server, test_handle);