添加跳转

This commit is contained in:
Peng-YM 2020-10-05 22:07:14 +08:00
parent a9a68be9f6
commit c619e4e6eb
2 changed files with 9 additions and 4 deletions

View File

@ -106,8 +106,13 @@ $app.get("/api/env", async (req, res) => {
}); });
}); });
$app.all("/", async (req, res) => { $app.route("/")
res.send("Hello from Sub-Store! Made with ❤️ by Peng-YM."); .get(async (req, res) => {
// 302 redirect
res.set("location", "https://sub-store.vercel.app/").status(302).end();
})
.options(async (req, res) => {
res.status(200).end();
}); });
$app.start(); $app.start();

File diff suppressed because one or more lines are too long