Skip to content

Commit

Permalink
better service landing pages (#2959)
Browse files Browse the repository at this point in the history
* update PDS home text

* update AppView home text

* ozone API homepage

* make fmt
  • Loading branch information
bnewbold authored Dec 23, 2024
1 parent 9ea2cce commit 13e834f
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 6 deletions.
20 changes: 17 additions & 3 deletions packages/bsky/src/api/health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,23 @@ export const createRouter = (ctx: AppContext): express.Router => {

router.get('/', function (req, res) {
res.type('text/plain')
res.send(
'This is an AT Protocol Application View (AppView) for the "bsky.app" application: https://github.com/bluesky-social/atproto\n\nMost API routes are under /xrpc/',
)
res.send(`
_ _
| | | |
| |__ ___| | ___ _
| '_ \\/ __| |/ / | | |
| |_) \\__ \\ <| |_| |
|_.__/|___/_|\\_\\\\__, |
__/ |
|___/
This is an AT Protocol Application View (AppView) for the "bsky.app" application.
Most API routes are under /xrpc/
Code: https://github.com/bluesky-social/atproto
Protocol: https://atproto.com
`)
})

router.get('/robots.txt', function (req, res) {
Expand Down
32 changes: 32 additions & 0 deletions packages/ozone/src/api/health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@ import AppContext from '../context'
export const createRouter = (ctx: AppContext): express.Router => {
const router = express.Router()

router.get('/', function (req, res) {
res.type('text/plain')
res.send(`
,o888888o. 8888888888',8888' ,o888888o. b. 8 8 8888888888
. 8888 '88. ,8',8888'. 8888 '88. 888o. 8 8 8888
,8 8888 '8b ,8',8888',8 8888 '8b Y88888o. 8 8 8888
88 8888 '8b ,8',8888' 88 8888 '8b .'Y888888o. 8 8 8888
88 8888 88 ,8',8888' 88 8888 88 8o. 'Y888888o. 8 8 888888888888
88 8888 88 ,8',8888' 88 8888 88 8'Y8o. 'Y88888o8 8 8888
88 8888 ,8P ,8',8888' 88 8888 ,8P 8 'Y8o. 'Y8888 8 8888
'8 8888 ,8P ,8',8888' '8 8888 ,8P 8 'Y8o. 'Y8 8 8888
' 8888 ,88' ,8',8888' ' 8888 ,88' 8 'Y8o.' 8 8888
'8888888P' ,8',8888888888888 '8888888P' 8 'Yo 8 888888888888
This is an AT Protocol Moderation Service API Server.
Most API routes are under /xrpc/
Code: https://github.com/bluesky-social/atproto
Self-Host: https://github.com/bluesky-social/ozone
Protocol: https://atproto.com
`)
})

router.get('/robots.txt', function (req, res) {
res.type('text/plain')
res.send(
'# Hello Friends!\n\n# Crawling the public parts of the API is allowed. HTTP 429 ("backoff") status codes are used for rate-limiting. Up to a handful concurrent requests should be ok.\nUser-agent: *\nAllow: /',
)
})

router.get('/xrpc/_health', async function (req, res) {
const { version } = ctx.cfg.service
try {
Expand Down
23 changes: 20 additions & 3 deletions packages/pds/src/basic-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,26 @@ export const createRouter = (ctx: AppContext): express.Router => {

router.get('/', function (req, res) {
res.type('text/plain')
res.send(
'This is an AT Protocol Personal Data Server (PDS): https://github.com/bluesky-social/atproto\n\nMost API routes are under /xrpc/',
)
res.send(`
__ __
/\\ \\__ /\\ \\__
__ \\ \\ ,_\\ _____ _ __ ___\\ \\ ,_\\ ___
/'__'\\ \\ \\ \\/ /\\ '__'\\/\\''__\\/ __'\\ \\ \\/ / __'\\
/\\ \\L\\.\\_\\ \\ \\_\\ \\ \\L\\ \\ \\ \\//\\ \\L\\ \\ \\ \\_/\\ \\L\\ \\
\\ \\__/.\\_\\\\ \\__\\\\ \\ ,__/\\ \\_\\\\ \\____/\\ \\__\\ \\____/
\\/__/\\/_/ \\/__/ \\ \\ \\/ \\/_/ \\/___/ \\/__/\\/___/
\\ \\_\\
\\/_/
This is an AT Protocol Personal Data Server (aka, an atproto PDS)
Most API routes are under /xrpc/
Code: https://github.com/bluesky-social/atproto
Self-Host: https://github.com/bluesky-social/pds
Protocol: https://atproto.com
`)
})

router.get('/robots.txt', function (req, res) {
Expand Down

0 comments on commit 13e834f

Please sign in to comment.