Jamon.dev
Jamon Holmgren's personal website, built in QBasic (yes, really)
Install / Use
/learn @jamonholmgren/Jamon.devREADME
Jamon.dev -- QB64 website
This website is built in QB64, which is a slightly more modern version of the venerable old QBasic I used to do. Yes, it's weird! But ... it works!
<img src="https://user-images.githubusercontent.com/1479215/209062980-5706a963-b880-4702-a1db-3195dff4c297.png" width="500" style="margin: 0 auto;" /> </center>The Code
You can find all of the QB64 code in ./app.bas along with pages in ./web/pages/*.html, CSS and JS in ./web/static/*, and common partial sections in ./web/*.
It includes a small hard-coded router that handles subpages like http://localhost:8080/subpage. Check out the handle_request function. I may make this dynamic in the future.
Building Locally
Install a version of QB64 from the website (not the ./bin/install_qb64 script -- that's only for the remote server) and open the app.bas file. You can then create an executable from there, or run it directly.
Once it's running (you'll see a terminal pop up with a blank black screen), go to http://localhost. The website will pop up and you'll see something like:
Request handled in .0060625 seconds.
Completed request for: /
from TCP/IP:46557:127.0.0.1
using Mozilla/5.0 (Macintosh...)
...show up in the terminal.
You can also run ./bin/build to build the executable and then run it.
./bin/build
./bin/run
Hosting
I spent several days trying to figure out how to host this, and finally got it working!
- Create a Digital Ocean Ubuntu droplet (use my affiliate link to help me recoup the hours of my time spent on getting all this to work!)
- Add your SSH public key to the Droplet through so you can SSH into the droplet
- Add a domain to that Droplet. Note that since this server doesn't support HTTPS out of the box, you'll need to use something like CloudFlare as a proxy in front of the server to enable HTTPS.
- SSH into the droplet with something like
ssh root@yourdomain.comand run these commands: curl -L -o ./qb64_lnx.tgz.gz https://github.com/QB64Official/qb64/releases/download/v2.1/qb64_dev_2022-09-08-07-14-00_47f5044_lnx.tar.gztar -xf ./qb64_lnx.tgz.gzmv ./qb64_2022-09-08-23-38-12_47f5044_lnx ./qb64nano ./qb64/setup_lnx.sh- In this setup file, comment out the first line that says "exit 1" ... it should be in the "you're trying to run as root" if block. Just put a # in front of it to comment it out
- Press Ctrl+X and enter to save & exit nano
- Now run the setup script to compile for this architecture (won't work without this!):
cd ./qb64 && ./setup_lnx.sh && cd - - Run
./qb64/qb64 --helpto ensure it works - Now you have a version of qb64 to compile the source. Exit out of the ssh shell with
exit - When you're ready to deploy, edit the
./bin/env.shscript to have your server's info, and then run./bin/deploy. You can add a--compileflag to make it compile the QB app, if anything changed in app.bas. - If you need to restart the QB server on DigitalOcean, use
./bin/restartor./bin/rebootfor a full reboot of the droplet - To watch server logs, go into an SSH session on your droplet and then run
tail -f /var/log/syslog
Gotchas
- If you're using a .dev domain like I am, you MUST use SSH. So how I handled this was I hosted the domain on DigitalOcean, and then used CloudFlare as a proxy in front of it. This way, I can use CloudFlare's free SSL certificate to enable HTTPS.
- There seems to be memory limits. I wasn't able to stream large HTML / CSS / JS files. I haven't figured out what those memory limits are, yet, but I'll update here when I do.
- To enable debug logging for troubleshooting server issues, set
ENABLE_LOG = 1inapp.basand recompile.
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
