File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ This probably should not be exposed to end users. :-)
7
7
8
8
# Installation
9
9
10
- ```
10
+ ``` bash
11
11
npm install -g sqliteproxy
12
12
```
13
13
@@ -24,13 +24,15 @@ Options:
24
24
--port: TCP Port to listen on
25
25
(default: 2048)
26
26
(a number)
27
+ --cors: CORS URLs to allow requests from
28
+ (default: [])
27
29
```
28
30
29
31
# Usage examples
30
32
31
33
## Existing DB
32
34
33
- ```
35
+ ``` console
34
36
$ sqliteproxy --db ./examples/vt.db
35
37
^Z
36
38
[1] + 23436 suspended sqliteproxy --db ./examples/vt.db
63
65
64
66
## Read only
65
67
66
- ```
68
+ ``` console
67
69
$ sqliteproxy --db ./examples/vt.db --readonly
68
70
^Z
69
71
[1] + 23447 suspended sqliteproxy --db ./examples/vt.db --readonly
78
80
79
81
## New DB
80
82
81
- ```
83
+ ``` console
82
84
$ sqliteproxy --db myNewDb.sqlite
83
85
^Z
84
86
[1] + 23453 suspended sqliteproxy --db myNewDb.sqlite
@@ -105,18 +107,32 @@ $ fg
105
107
^C
106
108
```
107
109
110
+ ## CORS
111
+
112
+ ``` console
113
+ $ sqliteproxy --db myNewDb.sqlite --cors http://example1.com --cors http://example2.com
114
+ ```
115
+
108
116
# Docker
109
117
110
118
[ https://hub.docker.com/r/assafmo/sqliteproxy ] ( https://hub.docker.com/r/assafmo/sqliteproxy/ )
111
119
112
120
```
121
+
113
122
docker run -d -p 2048:2048 -v /path/to/my/db/dir/:/data/ assafmo/sqliteproxy --db /data/my.db
123
+
114
124
```
115
125
116
126
```
127
+
117
128
docker run -d -p 2048:2048 -v /path/to/my/db/dir/:/data/ assafmo/sqliteproxy --readonly --db /data/my.db
129
+
118
130
```
119
131
120
132
# License
121
133
122
134
[ MIT] ( /LICENSE )
135
+
136
+ ```
137
+
138
+ ```
You can’t perform that action at this time.
0 commit comments