From ec28f7675eb87277d84a2ccd73e56832da8dae4a Mon Sep 17 00:00:00 2001 From: Sebastian Riedel Date: Fri, 17 Feb 2023 00:19:18 +0100 Subject: [PATCH] Use a redirect so we can switch to different reference docs later --- index.js | 4 ++++ views/menubar.html.tmpl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 6679c1f..a608b6c 100644 --- a/index.js +++ b/index.js @@ -27,6 +27,10 @@ app.any('/docs/*file').to('docs#index', {file: null}); app.any('/news/*file').to('news#index'); +app.get('/api', async ctx => { + await ctx.redirectTo('https://mojojs.org/static/reference/modules.html'); +}); + app.get('/', async ctx => { await ctx.render({view: 'index'}); }); diff --git a/views/menubar.html.tmpl b/views/menubar.html.tmpl index f664aa5..003b4fc 100644 --- a/views/menubar.html.tmpl +++ b/views/menubar.html.tmpl @@ -29,7 +29,7 @@ FAQ Cheatsheet - API + API