Bluesky app fork with some witchin' additions 馃挮
at main 21 lines 868 B view raw
1import {type Express} from 'express' 2 3import {type AppContext} from '../context.js' 4import {default as createShortLink} from './createShortLink.js' 5import {default as health} from './health.js' 6import {default as redirect} from './redirect.js' 7import {default as root} from './root.js' 8import {default as shortLink} from './shortLink.js' 9import {default as siteAssociation} from './siteAssociation.js' 10 11export * from './util.js' 12 13export default function (ctx: AppContext, app: Express) { 14 app = health(ctx, app) // GET /_health 15 app = siteAssociation(ctx, app) // GET /.well-known/apple-app-site-association 16 app = redirect(ctx, app) // GET /redirect 17 app = createShortLink(ctx, app) // POST /link 18 app = root(ctx, app) // GET / (redirect to bsky.app on root) 19 app = shortLink(ctx, app) // GET /:linkId (should go last due to permissive matching) 20 return app 21}