File tree Expand file tree Collapse file tree 5 files changed +7
-8
lines changed
examples/with-javascript-browser Expand file tree Collapse file tree 5 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ CHINOOK_DATABASE_URL="sqlitecloud://user:password@xxx.sqlite.cloud:8860/chinook.
99CHINOOK_API_KEY = xxxxxx
1010
1111# sqlite cloud gateway for socket.io connections
12- GATEWAY_URL = ws://localhost:4000
12+ GATEWAY_URL = ws://localhost:443
Original file line number Diff line number Diff line change @@ -19,8 +19,7 @@ <h1>SQLite Cloud Drivers</h1>
1919 < div class ="text-xs w-12 "> databaseUrl</ div >
2020 < input type ="text " id ="connectionStringInput "
2121 placeholder ="Example: sqlitecloud://admin:password@host.sqlite.cloud:8860/chinook.sqlite "
22- value ="sqlitecloud://host.sqlite.cloud:8860?apikey=apikey "
23- class ="border rounded w-full pl-2 pr-2 mb-2 " />
22+ value ="sqlitecloud://host.sqlite.cloud:8860?apikey=apikey " class ="border rounded w-full pl-2 pr-2 mb-2 " />
2423 < div class ="text-sm w-12 "> sql:</ div >
2524 < input type ="text " id ="messageInput "
2625 placeholder ="Example: USE DATABASE chinook.sqlite; select * from customers limit 3 "
@@ -51,7 +50,7 @@ <h2 class="pb-4">Results:</h2>
5150 // connect via websocket to the gateway on the same server
5251 const connectionConfig = {
5352 gatewayUrl : `${ window . location . protocol === 'https:' ? 'wss' : 'ws'
54- } ://${ window . location . hostname } :4000 `,
53+ } ://${ window . location . hostname } :443 `,
5554 connectionstring : connectionstring ,
5655 } ;
5756 var database = new window . sqlitecloud . Database (
Original file line number Diff line number Diff line change 11{
22 "name" : " @sqlitecloud/drivers" ,
3- "version" : " 1.0.739 " ,
3+ "version" : " 1.0.779 " ,
44 "description" : " SQLiteCloud drivers for Typescript/Javascript in edge, web and node clients" ,
55 "main" : " ./lib/index.js" ,
66 "types" : " ./lib/index.d.ts" ,
109109 "browser" : {
110110 "tls" : false
111111 }
112- }
112+ }
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export class SQLiteCloudWebsocketConnection extends SQLiteCloudConnection {
3030 if ( ! this . socket ) {
3131 this . config = config
3232 const connectionstring = this . config . connectionstring as string
33- const gatewayUrl = this . config ?. gatewayurl || `${ this . config . host === 'localhost' ? 'ws' : 'wss' } ://${ this . config . host as string } :4000 `
33+ const gatewayUrl = this . config ?. gatewayurl || `${ this . config . host === 'localhost' ? 'ws' : 'wss' } ://${ this . config . host as string } :443 `
3434 this . socket = io ( gatewayUrl , { auth : { token : connectionstring } } )
3535
3636 this . socket . on ( 'connect' , ( ) => {
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export interface SQLiteCloudConfig {
8585
8686 /** True if we should force use of SQLite Cloud Gateway and websocket connections, default: true in browsers, false in node.js */
8787 usewebsocket ?: boolean
88- /** Url where we can connect to a SQLite Cloud Gateway that has a socket.io deamon waiting to connect, eg. wss://host:4000 */
88+ /** Url where we can connect to a SQLite Cloud Gateway that has a socket.io deamon waiting to connect, eg. wss://host:443 */
8989 gatewayurl ?: string
9090
9191 /** Optional identifier used for verbose logging */
You can’t perform that action at this time.
0 commit comments