Skip to content

Commit

Permalink
feat: adding url to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrorezende committed Jul 4, 2024
1 parent d6c9eaa commit 4e9061e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ app.listen(httpPort, () => {
console.log(
httpConsole(`HTTP Server listening to http://localhost:${httpPort}`),
);
watchFileForChanges();
console.log(
httpConsole(`Please access the following URL on Firefox: ${anomaUrl}`),
);
open(anomaUrl);
});

app.get("/events", (req, res) => {
Expand Down Expand Up @@ -116,6 +121,3 @@ const watchFileForChanges = () => {
async function update(res) {
sendUpdatedBlogInfo(res, await parseFileUpdates(filename));
}

watchFileForChanges();
open(anomaUrl);

0 comments on commit 4e9061e

Please sign in to comment.