You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> [!IMPORTANT] > **Requires: [Git](https://git-scm.com/downloads), [Go 1.22.4](https://go.dev/doc/install), [GNU Makefile](https://www.gnu.org/software/make/#download), and a [PostgreSQL](https://www.postgresql.org/download/)[server](https://m.do.co/c/beaf675c3e00).**
68
+
> [!IMPORTANT]
69
+
> **Requires: [Git](https://git-scm.com/downloads), [Go 1.22.4](https://go.dev/doc/install), [GNU Makefile](https://www.gnu.org/software/make/#download), and a SQLite database or [PostgreSQL](https://www.postgresql.org/download/)[server](https://m.do.co/c/beaf675c3e00).**
|`SPIRIT_HOST`| String |`0.0.0.0`| Host address to listen on |
88
-
|`SPIRIT_PORT`| Int |`9000`| HTTP port to listen on |
89
-
|`SPIRIT_RATELIMITER`| String |`200x5`| Requests allowed per second before the user is ratelimited |
90
-
|`SPIRIT_CONNECTION_URI`| String |**Required**|[PostgreSQL Database URI String](https://stackoverflow.com/questions/3582552/what-is-the-format-for-the-postgresql-connection-string-url#20722229)|
91
-
|`SPIRIT_HEADLESS`| Bool |`False`| Enables/disables the web interface |
92
-
|`SPIRIT_ANALYTICS`| String |`""`|`<script>` tag for analytics (leave blank to disable) |
93
-
|`SPIRIT_ID_LENGTH`| Int |`8`| Length for document IDs |
94
-
|`SPIRIT_ID_TYPE`|`"key"` or `"phrase"`|`key`| Format of IDs: `key` is a random string of letters and [`phrase` is a combination of words](https://github.com/lukewhrit/phrase)|
95
-
|`SPIRIT_MAX_SIZE`| Int |`400000`| Max allowed size of a document in bytes |
96
-
|`SPIRIT_EXPIRATION_AGE`| Int64 |`720`| Amount of time to expire documents after |
97
-
|`SPIRIT_DOCUMENTS`|[]String |`[]`| List of any custom documents to serve |
|`SPIRIT_HOST`| String |`0.0.0.0`| Host address to listen on |
91
+
|`SPIRIT_PORT`| Int |`9000`| HTTP port to listen on |
92
+
|`SPIRIT_RATELIMITER`| String |`200x5`| Requests allowed per second before the user is ratelimited |
93
+
|`SPIRIT_CONNECTION_URI`| String |**Required**| Database connection URI |
94
+
|`SPIRIT_HEADLESS`| Bool |`False`| Enables/disables the web interface |
95
+
|`SPIRIT_ANALYTICS`| String |`""`|`<script>` tag for analytics (leave blank to disable) |
96
+
|`SPIRIT_ID_LENGTH`| Int |`8`| Length for document IDs |
97
+
|`SPIRIT_ID_TYPE`|`"key"` or `"phrase"`|`key`| Format of IDs: `key` is a random string of letters and [`phrase` is a combination of words](https://github.com/lukewhrit/phrase)|
98
+
|`SPIRIT_MAX_SIZE`| Int |`400000`| Max allowed size of a document in bytes |
99
+
|`SPIRIT_EXPIRATION_AGE`| Int64 |`720`| Amount of time to expire documents after |
100
+
|`SPIRIT_DOCUMENTS`|[]String |`[]`| List of any custom documents to serve |
98
101
99
102
> [!WARNING]
100
103
> Environment variables for Spacebin are prefixed with `SPIRIT_`. They will be updated to `SPACEBIN_` in the next major version.
101
104
105
+
##### Database Connection URI
106
+
107
+
Spacebin supports two database formats: **SQLite** and **Postgres**
108
+
109
+
- For SQLite, use either the scheme `file://` or `sqlite://` and a file name.
110
+
- Example: `file://database.db`
111
+
- For PostgreSQL, use [the standard PostgreSQL URI format](https://stackoverflow.com/questions/3582552/what-is-the-format-for-the-postgresql-connection-string-url#20722229).
112
+
102
113
### Usage
103
114
104
115
#### On the Web
105
116
106
117
To use Spacebin on the web, our team provides a web app. You can access the web app at **[spaceb.in](https://spaceb.in)**. You must use `https://spaceb.in/api` to access the API routes.
107
118
108
-
A version of spacebin that is built directly from the `develop` branch is also available at \*\*[staging.spaceb.in](https://staging.spaceb.in)
119
+
A version of spacebin that is built directly from the `develop` branch is also available at [staging.spaceb.in](https://staging.spaceb.in).
0 commit comments