Skip to content

Commit

Permalink
[doc] Updated Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rryqszq4 committed Feb 17, 2017
1 parent dbdb2d8 commit 7f58bdf
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 2-Clause License

Copyright (c) 2017, Quan Zhao
Copyright (c) 2017, rryqszq4
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
85 changes: 84 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,84 @@
# ngx_sqlite
ngx_sqlite
==========
[ngx_sqlite](https://github.com/rryqszq4/ngx_sqlite) - Embedded sqlite for nginx-module.

Requirement
-----------
- sqlite 3
- nginx-1.6.3+

Installation
-------
```sh
$ git clone https://github.com/rryqszq4/ngx_sqlite.git

$ wget 'http://nginx.org/download/nginx-1.6.3.tar.gz'
$ tar -zxvf nginx-1.6.3.tar.gz
$ cd nginx-1.6.3

$ export SQLITE_INC=/path/to/sqlite
$ export SQLITE_LIB=/path/to/sqlite

$ ./configure --user=www --group=www \
--prefix=/path/to/nginx \
--add-module=/path/to/ngx_sqlite
$ make
$ make install
```

Synopsis
--------
nginx config:
```nginx
user www www;
worker_processes 4;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location /sqlite {
sqlite_query "select * from test;";
}
}
}
```

Copyright and License
---------------------
BSD 2-Clause License

Copyright (c) 2017, rryqszq4
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8 changes: 6 additions & 2 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_sqlite_module.c"

NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ngx_http_sqlite_module.h"

CORE_INCS="$CORE_INCS /usr/local/include"
CORE_INCS="$CORE_INCS $SQLITE_INC"

CORE_LIBS="$CORE_LIBS -L/usr/local/lib -lsqlite3"
CORE_LIBS="$CORE_LIBS -L$SQLITE_LIB -lsqlite3"

#CORE_INCS="$CORE_INCS /usr/local/include"

#CORE_LIBS="$CORE_LIBS -L/usr/local/lib -lsqlite3"

0 comments on commit 7f58bdf

Please sign in to comment.