handle missing url

main
Lee Hanken 2022-01-08 17:35:43 +00:00
parent 11007ff0c2
commit 3aa61c5c35
1 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,11 @@ const port = process.env.PORT
app.get('/', (req, res) => {
url = req.query.url;
read_url(url, res);
if (url) {
read_url(url, res);
} else {
res.send("Please specify url query parameter.");
}
});
app.listen(port, () => {