https://github.com/jamonholmgren/qub Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} jamonholmgren / qub Public * Notifications You must be signed in to change notification settings * Fork 1 * Star 79 Qub is a CLI and QB64 web framework for building websites with QBasic. Star this repo! qub.jamon.dev License View license 79 stars 1 fork Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Security * Insights jamonholmgren/qub This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 54 Commits .github .github src src template template LICENSE LICENSE README.md README.md View all files Repository files navigation * README * License Qub -- QBasic Website Generator Qub (pronounced "cube") is a CLI that generates a web server and framework for building websites in QB64 -- a more modern variant of QBasic. Screenshot of Qub running Screenshot of Qub-powered website Getting started (Note: macOS & Linux only) To get started, set up your qub alias first. This is the quick & easy way: alias qub="source <(curl -sSL https://raw.githubusercontent.com/jamonholmgren/qub/main/src/cli.sh)" However, some are understandably uncomfortable with running a script directly from the internet. If you'd like to run it locally, here's how: Manual setup Download it: curl -sSL https://raw.githubusercontent.com/jamonholmgren/qub/main/src/cli.sh > ./qub.sh Open the qub.sh file in your editor and review it. If you're comfortable with what it's doing, alias it: alias qub="source $PWD/qub.sh" Now, you should be able to run the CLI: qub qub --version qub --help qub create qub update Windows Support: Qub has only been tested on macOS and Linux. It might work on Windows WSL (Windows Subsystem for Linux) or Git Bash on Windows. If you want to help test and make it run on Windows, please open an issue or PR! Creating a website To create a website, run qub create and follow the prompts: qub create It'll ask you for your domain name (e.g. jamon.dev) which doubles as your project's folder name. It will also ask if you want to install QB64 (I recommend you do). When done, you can CD into the new folder and run ./bin/build to build the website. Then, run ./server to start the web server. Visit http://localhost:6464/ to view the website. Modifying your website Your new website has the following folder structure: bin qub server.bas qub.conf web pages home.html contact.html static scripts.js styles.css layout.html README.md qub/server.bas This is the Qub web server. You can periodically update it by running qub update. Note this will blow away any modifications you've made, so be careful! Qub's web server was originally based on Yacy by SmokingWheels, but has been heavily modified since. It comes with a number of features: * [*] Page routing (e.g. jamon.dev/links renders web/pages/ links.html) * [*] Individual header and footer and support * [*] Static file serving (css, js, etc) * [*] Binary file serving (images, fonts, etc) * [*] Custom 404 page support * [*] Basic dynamic variable support (e.g. in web/ layout.html, etc) * [*] Custom port support (via ./qub.conf) * [ ] Customizable dynamic variable support (coming soon) * [ ] 301 redirects support (coming soon) * [ ] Custom 500 page support (coming soon) * [ ] More customizable templating support (coming soon) It does not (and probably won't) support HTTPS or HTTP2. I recommend putting CloudFlare in front of it in production (more in the deploy guide below). Common included files In the web folder, you'll find a layout.html file. This is the standard layout for your website, and includes your html's head and body sections, with placeholder comments for dynamic content like what page is being rendered.