From 65639a233b15d19219e9d85d32f59d383c598500 Mon Sep 17 00:00:00 2001 From: Danny Spina Date: Mon, 19 Jun 2023 14:55:28 +0200 Subject: [PATCH] Fix frontend + info page --- dist/index.html | 66 +------------------------------------------------ dist/info.html | 1 + index.ts | 4 +++ 3 files changed, 6 insertions(+), 65 deletions(-) create mode 100644 dist/info.html diff --git a/dist/index.html b/dist/index.html index ab0dc77..da34816 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,65 +1 @@ - - - - - - Blaze The Page - - -

Welcome to Blaze the Page

- -
-

What?

-

- What is "Blaze the page"? It is a small service that provides a minimal - version of a web page. Simply paste a URL and click the button to obtain - an extremely lightweight version of the page, concentrating solely on the - content. -

-

Why?

-

- One day, I exceeded my monthly data limit for high-speed browsing. - Consequently, my internet speed was reduced significantly. As a result, - web pages took an extremely long time to load, and I encountered timeout - errors 90% of the time. It was at that moment I contemplated a solution to - this issue and conceived the idea of Blaze this page. -

-

How?

-

- It's actually very straightforward. When you click on "BLAZE IT!", the URL - changes to https://ill-red-skunk-wig.cyclic.app?at= followed by the URL - you pasted. This address is where the backend is hosted. When the site is - accessed with the "at" parameter, a simple Node.js application retrieves - the content and generates an extremely lightweight version of the page, - retaining only the essential elements: the content. This minimal page is - the result of the request and will be displayed in your browser. -

-

Does it work?

-

- Yes. The purpose of keeping this page as minimal as possible is to make it - significantly lighter than a typical webpage. As a result, even with a - poor internet connection, you can load this page relatively quickly. When - you click on "BLAZE IT!", you receive a webpage that is only a few - kilobytes in size instead of several megabytes. This makes it feasible to - load the page even under challenging connection conditions, preventing - timeout errors from occurring. -

- - - + Blaze The Page

Blaze



\ No newline at end of file diff --git a/dist/info.html b/dist/info.html new file mode 100644 index 0000000..3648415 --- /dev/null +++ b/dist/info.html @@ -0,0 +1 @@ +

What is this site?

Blaze is an ultrafast search engine. The purpose of Blaze is to minimize the transferred data between clients and servers, allowing users to navigate the web in a minimalist manner.

Why?

One day, I exceeded my monthly data limit for high-speed browsing. As a consequence, my internet speed was significantly reduced. Consequently, web pages took an extremely long time to load, and I encountered timeout errors 90% of the time. It was at that moment that I contemplated a solution to this issue and conceived the idea of Blaze. Now, I can surf the web super fast and access the information I need even without a high-speed connection.

How?

It's actually very straightforward. When you click on "BLAZE IT!", the URL changes to https://ill-red-skunk-wig.cyclic.app?q= followed by the query you searched for. This address is where the backend is hosted. When the site is accessed with the "q" parameter, a simple Node.js application retrieves the search results and generates an extremely lightweight version of SERP (Search Engine Results Page). From there, if you click on a link, it will be parsed and a page will be generated with only the content (I used the same library that Firefox uses to generate the reader mode). This makes it possible to navigate using only a few kilobytes of data instead of megabytes.

Does it work?

Yes, even with a poor internet connection, you can search for things and load pages extremely quickly. When you click on "BLAZE IT!" and select a search result, you receive a webpage that is only a few kilobytes in size instead of several megabytes. This makes it possible to load the page even under challenging connection conditions, effectively preventing timeout errors from occurring.

Other implications

This project was born to address an issue with slow internet connections while allowing continuous web surfing. During development, I discovered several other positive implications. Browsing a lightweight and minimalistic web puts less stress on the phone's battery and processor. It is mostly free from ads, and it likely has other, albeit possibly minor, impacts on the environment (e.g., reduced battery drain, decreased need for frequent phone charging, and lower CO2 emissions). Moreover, Blaze can serve as an "emergency search engine" for browsing the web in challenging connection situations, and it can even be a lifesaver at times.

Open Source

The code is open source, and you can host your hown version of Blaze, or contribute to it.

Who I am?

I am Danny, you can learn more about meon my website

\ No newline at end of file diff --git a/index.ts b/index.ts index 7d004a4..6ae1da9 100644 --- a/index.ts +++ b/index.ts @@ -97,6 +97,10 @@ got(pageToBlaze) }); }) +app.get("/info", (_, res) => { + res.sendFile(path.join(__dirname + "/dist/info.html")); +}) + app.listen(port, () => { console.log(`Got request`); });