Scratch space for learning atproto app development

tidy

Changed files
+3 -3
src
+1 -1
.env.template
···
# Environment Configuration
NODE_ENV="development" # Options: 'development', 'production'
PORT="8080" # The port your server will listen on
-
PUBLIC_URL="" # Set when deployed publicly, e.g. "https://mysite.com". Informs OAuth client id.
DB_PATH="db.sqlite" # The SQLite database path. Set as ":memory:" to use a temporary in-memory database.
LOG_LEVEL="info" # Options: 'error', 'warn', 'info', 'debug'
# PDS_URL="https://my.pds" # The the default PDS for login and sign-ups
···
# Environment Configuration
NODE_ENV="development" # Options: 'development', 'production'
PORT="8080" # The port your server will listen on
+
# PUBLIC_URL="" # Set when deployed publicly, e.g. "https://mysite.com". Informs OAuth client id.
DB_PATH="db.sqlite" # The SQLite database path. Set as ":memory:" to use a temporary in-memory database.
LOG_LEVEL="info" # Options: 'error', 'warn', 'info', 'debug'
# PDS_URL="https://my.pds" # The the default PDS for login and sign-ups
+1 -1
src/env.ts
···
choices: ['development', 'production', 'test'],
}),
PORT: port({ devDefault: testOnly(3000) }),
-
PUBLIC_URL: str({}),
DB_PATH: str({ devDefault: ':memory:' }),
COOKIE_SECRET: str({ devDefault: '00000000000000000000000000000000' }),
PRIVATE_KEYS: envalidJsonWebKeys({ default: undefined }),
···
choices: ['development', 'production', 'test'],
}),
PORT: port({ devDefault: testOnly(3000) }),
+
PUBLIC_URL: str({ default: undefined }),
DB_PATH: str({ devDefault: ':memory:' }),
COOKIE_SECRET: str({ devDefault: '00000000000000000000000000000000' }),
PRIVATE_KEYS: envalidJsonWebKeys({ default: undefined }),
+1 -1
src/pages/login.ts
···
const signupService =
!env.PDS_URL || env.PDS_URL === 'https://bsky.social'
? 'Bluesky'
-
: env.PDS_URL
const signupUrl = state
? `/signup?state=${encodeURIComponent(state)}`
···
const signupService =
!env.PDS_URL || env.PDS_URL === 'https://bsky.social'
? 'Bluesky'
+
: new URL(env.PDS_URL).hostname
const signupUrl = state
? `/signup?state=${encodeURIComponent(state)}`