55812b0394
* bskylink: scaffold service w/ initial config and schema * bskylink: implement link creation and redirects * bskylink: tidy * bskylink: tests * bskylink: tidy, add error handler * bskylink: add dockerfile * bskylink: add build * bskylink: fix some express plumbing * bskyweb: proxy fallthrough routes to link service redirects * bskyweb: build w/ link proxy * Add AASA to bskylink (#4588) --------- Co-authored-by: Hailey <me@haileyok.com>
18 lines
629 B
TypeScript
18 lines
629 B
TypeScript
import {Express} from 'express'
|
|
|
|
import {AppContext} from '../context.js'
|
|
import {default as create} from './create.js'
|
|
import {default as health} from './health.js'
|
|
import {default as redirect} from './redirect.js'
|
|
import {default as siteAssociation} from './siteAssociation.js'
|
|
|
|
export * from './util.js'
|
|
|
|
export default function (ctx: AppContext, app: Express) {
|
|
app = health(ctx, app) // GET /_health
|
|
app = siteAssociation(ctx, app) // GET /.well-known/apple-app-site-association
|
|
app = create(ctx, app) // POST /link
|
|
app = redirect(ctx, app) // GET /:linkId (should go last due to permissive matching)
|
|
return app
|
|
}
|