tangled
alpha
login
or
join now
nekomimi.pet
/
wisp.place-monorepo
87
fork
atom
Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol.
wisp.place
87
fork
atom
overview
issues
9
pulls
pipelines
marketing page on /home
nekomimi.pet
2 weeks ago
e1de8dc0
e2004b6b
1/2
deploy-wisp.yml
success
42s
test.yml
failed
44s
+17
1 changed file
expand all
collapse all
unified
split
apps
main-app
src
index.ts
+17
apps/main-app/src/index.ts
reviewed
···
216
216
const html = await Bun.file('./apps/main-app/public/landingpage.html').text()
217
217
return html.replaceAll('{{ATPROTO_LOGIN_URL}}', atprotoLoginUrl)
218
218
})
219
219
+
.get('/home', async ({ request, set }) => {
220
220
+
// Same as / but without the auto-redirect script for signed-in users
221
221
+
const loginUrl = isLocalDev
222
222
+
? `${new URL(request.url).origin}/api/auth/login`
223
223
+
: `${config.domain}/api/auth/login`
224
224
+
const atprotoLoginUrl = `https://atproto.wisp.place/?next=${encodeURIComponent(loginUrl)}`
225
225
+
226
226
+
set.headers['Content-Type'] = 'text/html; charset=utf-8'
227
227
+
228
228
+
const html = await Bun.file('./apps/main-app/public/landingpage.html').text()
229
229
+
return html
230
230
+
.replaceAll('{{ATPROTO_LOGIN_URL}}', atprotoLoginUrl)
231
231
+
.replace(
232
232
+
/<script>\s*\/\/ Check if user is already signed in[\s\S]*?<\/script>/,
233
233
+
''
234
234
+
)
235
235
+
})
219
236
.use(authRoutes(client, cookieSecret))
220
237
.use(wispRoutes(client, cookieSecret))
221
238
.use(domainRoutes(client, cookieSecret))