Skip to content

Commit 0851076

Browse files
committed
add examples of percent encoding
1 parent 9e58075 commit 0851076

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Here are the available configuration options and their default values:
99
| variable | default | description |
1010
| --------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1111
| `listen_on` | 0.0.0.0:8080 | Interface and port on which the web server should listen |
12-
| `database_url` | sqlite://sqlpage.db?mode=rwc | Database connection URL, in the form `dbname://user:password@host:port/dbname`. Special characters in user and password should be [percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). |
12+
| `database_url` | sqlite://sqlpage.db?mode=rwc | Database connection URL, in the form `dbengine://user:password@host:port/dbname`. Special characters in user and password should be [percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). |
1313
| `port` | 8080 | Like listen_on, but specifies only the port. |
1414
| `unix_socket` | | Path to a UNIX socket to listen on instead of the TCP port. If specified, SQLPage will accept HTTP connections only on this socket and not on any TCP port. This option is mutually exclusive with `listen_on` and `port`.
1515
| `max_database_pool_connections` | PostgreSQL: 50<BR> MySql: 75<BR> SQLite: 16<BR> MSSQL: 100 | How many simultaneous database connections to open at most |
@@ -54,7 +54,7 @@ If you have a `.env` file in the current directory or in any of its parent direc
5454

5555
The `database_url` parameter sets all the connection parameters for the database, including
5656

57-
- the database type (`sqlite`, `postgres`, `mysql`, `mssql`, etc.)
57+
- the database engine type (`sqlite`, `postgres`, `mysql`, `mssql`, etc.)
5858
- the username and password
5959
- the host (or ip adress) and port
6060
- the database name
@@ -67,7 +67,7 @@ The `database_url` parameter sets all the connection parameters for the database
6767
- `application_name=my_application` for PostgreSQL to set the application name, which can be useful for monitoring and logging on the database server side.
6868
- `collation=utf8mb4_unicode_ci` for MySQL to set the collation of the connection
6969

70-
All the parameters need to be properly [percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) if they contain special characters.
70+
All the parameters need to be properly [percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) if they contain special characters like `@` (`%40`), `:` (`%3A`), `/` (`%2F`), `?` (`%3F`), `#` (`%23`).
7171

7272
A full connection string for a PostgreSQL database might look like this:
7373

0 commit comments

Comments
 (0)