Skip to content

Commit 01b22da

Browse files
committed
readme cors
1 parent 323d5da commit 01b22da

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This probably should not be exposed to end users. :-)
77

88
# Installation
99

10-
```
10+
```bash
1111
npm install -g sqliteproxy
1212
```
1313

@@ -24,13 +24,15 @@ Options:
2424
--port: TCP Port to listen on
2525
(default: 2048)
2626
(a number)
27+
--cors: CORS URLs to allow requests from
28+
(default: [])
2729
```
2830

2931
# Usage examples
3032

3133
## Existing DB
3234

33-
```
35+
```console
3436
$ sqliteproxy --db ./examples/vt.db
3537
^Z
3638
[1] + 23436 suspended sqliteproxy --db ./examples/vt.db
@@ -63,7 +65,7 @@ $ fg
6365

6466
## Read only
6567

66-
```
68+
```console
6769
$ sqliteproxy --db ./examples/vt.db --readonly
6870
^Z
6971
[1] + 23447 suspended sqliteproxy --db ./examples/vt.db --readonly
@@ -78,7 +80,7 @@ $ fg
7880

7981
## New DB
8082

81-
```
83+
```console
8284
$ sqliteproxy --db myNewDb.sqlite
8385
^Z
8486
[1] + 23453 suspended sqliteproxy --db myNewDb.sqlite
@@ -105,18 +107,32 @@ $ fg
105107
^C
106108
```
107109

110+
## CORS
111+
112+
```console
113+
$ sqliteproxy --db myNewDb.sqlite --cors http://example1.com --cors http://example2.com
114+
```
115+
108116
# Docker
109117

110118
[https://hub.docker.com/r/assafmo/sqliteproxy](https://hub.docker.com/r/assafmo/sqliteproxy/)
111119

112120
```
121+
113122
docker run -d -p 2048:2048 -v /path/to/my/db/dir/:/data/ assafmo/sqliteproxy --db /data/my.db
123+
114124
```
115125

116126
```
127+
117128
docker run -d -p 2048:2048 -v /path/to/my/db/dir/:/data/ assafmo/sqliteproxy --readonly --db /data/my.db
129+
118130
```
119131

120132
# License
121133

122134
[MIT](/LICENSE)
135+
136+
```
137+
138+
```

0 commit comments

Comments
 (0)