2024-11-08 01:46:16 -05:00
2024-11-08 01:46:16 -05:00
2024-11-08 01:43:16 -05:00
2024-10-21 20:59:07 -04:00
2024-11-07 13:59:02 -05:00
2024-10-15 13:50:20 -04:00
2024-11-07 13:59:02 -05:00
2024-11-07 18:57:13 -05:00
2024-11-08 00:08:46 +00:00

aidxnFUN

License: CC0-1.0 FOSSA Status FOSSA Status

The full code of my website, under the CC0-1.0 license (public domain). Built with Tailwind CSS, EJS, Express.js, and Node.js

Install and self-host

Have a weird obsession? Want a pre-built site you can use for free? Host aidxnFUN! As the code is available under the CC0-1.0 license, which means you should feel free and encouraged to change content, design, whatever!

During this process, node (20.08.0), npm, and netcat will be installed. If you use Windows, you must manually install NodeJS.

Please note: The /status endpoint will be broken with default servers (ones I own) as CORS will block requests not made from aidxn.fun

Debian/Ubuntu/Other Debian-based systems

  1. Clone the repo
    git clone https://github.com/ihatenodejs/aidxnFUN
    cd aidxnFUN
    
  2. Setup manage
    ./manage setup
    
  3. Start the server
    ./manage up
    
    A server will now start on port :5566, and be accessible from your web browser at http://localhost:5566/. I highly suggest creating a NGINX reverse proxy for this, especially if you plan to point this to a domain.

Windows

Windows support is still in the works, however it is possible to run aidxnFUN under Windows.

  1. Install NodeJS and NPM for Windows from nodejs.org
  2. Open a Node.js command prompt
  3. Clone the repo
    git clone https://github.com/ihatenodejs/aidxnFUN
    cd aidxnFUN
    
  4. Build the app
    npm run winbuild
    
  5. Run the app on port 5566
    set PORT=5566 && node app.js
    
    You may use the PORT variable to set a custom port. While Windows tends to default to 3000, we will use 5566, which is the default for aidxnFUN on Linux.

How it works

This website uses Node.js, Express.js for a server, EJS for templating, and Tailwind CSS for the frontend CSS.

The manage script uses all of those tools to manage the server for you executes the repetitive tasks for you automatically.

The views contain both regular page shards (full-ish pages) and generic shards (fragments of pages, widgets, etc.). I define a "shard" as an EJS template, which are pieced together into a pretty little website. The shards hold individual elements like music widgets, while a regular page shard is the page that contains the music widget, which the end user sees. This is helpful for understanding the code.

Thus far, shards are included for a music widget, the header, and the footer of the pages.

Music (as featured on the home page) is fetched from an API (hosted on https://biancarosa.com.br), which I am in the process of setting up for myself. It works with a LastFM account (I linked this to my Spotify) and can track your live listening with amazing accuracy. The repo can be found at biancarosa/lastfm-last-played.

Using the manage script

You may have noticed you have a manage file after cloning. manage is a command-line tool to manage the server. It can automatically start, stop, and restart your instance. This script only supports Linux-based systems.

First, you must complete the setup with the following commands:

chmod +x manage
./manage setup

After doing that, you are now ready to use the script.

manage usage

./manage [command] [options]

manage commands

  • ./manage up - Builds the project and starts the server
  • ./manage down - Stops the server
  • ./manage restart - Restarts the server
  • ./manage status, -s, --status - Checks if the server is running
  • ./manage help, -h, --help - Shows the help message

Troubleshooting

I highly suggest you take a peek at the node.log file's contents. It's in the same directory as the manage script. This file contains the NodeJS server logs, which can be very helpful for debugging and/or troubleshooting.

To-Do

  • Implement PGP message verification
  • Create manage script for Windows
  • Add menu link to tilde website
  • Update projects page to latest information

License

FOSSA Status

Description
The full code of my website, under the public domain
Readme 497 KiB
2025-03-08 05:41:23 +00:00
Languages
EJS 62.5%
Shell 25.9%
JavaScript 10.6%
CSS 1%