A web server where its responses are entirely generated by an LLM based on the request path.
Caution
This is only intended to be a fun experiment. Do not actually use this concept in production environment. It's very fragile, vulnerable, and inefficient due to the nature of Generative AI.
demo.mp4
No live demos provided at this time. You may test this out by following the instructions below to run it yourself.
- Clone or download this repo
- Ensure that you have already installed NodeJS version 22 or newer beforehand. Older versions are not tested and not guaranteed to work. The logic itself runs in a single
index.jsfile that uses NodeJS's built-in helper libraries and some recent JavaScript features. Using this approach, this experiment doesn't require any external npm dependencies. - Ensure that
ollamais set up. The script uses theqwen3:1.7bmodel by default (for quick performance when testing) and interacts with it via the Ollama API (for now). Both the model and the endpoint can be changed by editingindex.js(inside thegetAPIOptfunction for the model and after a call ofgetAPIOpt()insidecreateServerfor the latter). Other options such as the listening port can also be changed inside that file. - Start the Ollama server by running
ollama serveand pull some models if you haven't done one or both of it already. - Run the server by executing
node .(ornode index.jsto be specific, both does the same thing) - The script should give you a port an a URL. Test it on your web browser. Example query: http://localhost:8080/about-me. The path can be any sensible path that the model can understand, as long as the file type is supported (and not a binary file).
Other cool projects and experiments as my inspiration to create this experiment:
- NeuralOS
- Ch.at – A lightweight LLM chat service accessible through HTTP, SSH, DNS and API
- Simulating a Neural Operating System with Gemini 2.5 Flash Lite - Google Developers Blog
- Show HN: This Website Does Not Exist
- Building a Virtual Machine Inside ChatGPT
- Show HN: A store that generates products from anything you type in search
- Show HN: Vibe Linking