Skip to content

Commit

Permalink
添加index.html和robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
yllhwa committed Oct 9, 2023
1 parent 3fd9465 commit 6a07aab
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>RSSWorker - Made with ❤</title>
</head>
<body>
<h1>RSSWorker - Made with ❤</h1>
<p>See <a href="https://github.com/yllhwa/RSSWorker">GitHub</a> for more information.</p>
</body>
</html>
2 changes: 2 additions & 0 deletions src/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow: /
9 changes: 8 additions & 1 deletion src/worker.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { Hono } from 'hono';
import { basicAuth } from 'hono/basic-auth';
import { cors } from 'hono/cors';
import indexHtml from './index.html';
import robotsTxt from './robots.txt';

import route from './route';

const app = new Hono();

app.route('/rss', route);

app.get('/', (ctx) => {
return ctx.html(indexHtml);
});
app.get('robots.txt', (ctx) => {
return ctx.text(robotsTxt);
});
// app.use(
// '/*',
// basicAuth({
Expand Down

0 comments on commit 6a07aab

Please sign in to comment.