Merge branch '4036' into 'main'

Port 8000 -> 4036 in all the places

See merge request soapbox-pub/ditto!265
This commit is contained in:
Alex Gleason 2024-05-16 13:13:12 +00:00
commit b2c26c9374
3 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
# Edit this file to change occurences of "example.com" to your own domain.
upstream ditto {
server 127.0.0.1:8000;
server 127.0.0.1:4036;
}
upstream ipfs_gateway {

View File

@ -55,7 +55,7 @@ class Conf {
}
/** Origin of the Ditto server, including the protocol and port. */
static get localDomain() {
return Deno.env.get('LOCAL_DOMAIN') || 'http://localhost:8000';
return Deno.env.get('LOCAL_DOMAIN') || `http://localhost:${Conf.port}`;
}
/** URL to an external Nostr viewer. */
static get externalDomain() {

View File

@ -33,15 +33,15 @@ Deno.test('query events with domain search filter', async () => {
await eventsDB.event(event1);
assertEquals(await eventsDB.query([{}]), [event1]);
assertEquals(await eventsDB.query([{ search: 'domain:localhost:8000' }]), []);
assertEquals(await eventsDB.query([{ search: 'domain:localhost:4036' }]), []);
assertEquals(await eventsDB.query([{ search: '' }]), [event1]);
await kysely
.insertInto('pubkey_domains')
.values({ pubkey: event1.pubkey, domain: 'localhost:8000', last_updated_at: event1.created_at })
.values({ pubkey: event1.pubkey, domain: 'localhost:4036', last_updated_at: event1.created_at })
.execute();
assertEquals(await eventsDB.query([{ kinds: [1], search: 'domain:localhost:8000' }]), [event1]);
assertEquals(await eventsDB.query([{ kinds: [1], search: 'domain:localhost:4036' }]), [event1]);
assertEquals(await eventsDB.query([{ kinds: [1], search: 'domain:example.com' }]), []);
});