2024-10-12 21:44:25 -04:00
# aidxnFUN
2024-10-15 14:04:20 -04:00
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fihatenodejs%2FaidxnFUN?ref=badge_shield& issueType=license)
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fihatenodejs%2FaidxnFUN?ref=badge_shield& issueType=security)
2024-10-15 19:48:19 -04:00
Built with Tailwind CSS, EJS, Express.js, and Node.js for a backend for it all.
2024-10-12 19:24:15 -04:00
This is a more modern version of design.
2024-10-15 13:52:14 -04:00
This project is released under the CC0-1.0 license. The code and content are in the public domain.
2024-10-12 19:24:15 -04:00
2024-10-15 19:48:19 -04:00
# Install and self-host
2024-10-13 11:31:10 -04:00
Have a weird obsession? Want a pre-built site you can use for free? Host aidxnFUN!
2024-10-15 19:47:15 -04:00
As the code is available under the CC0-1.0 license, which means you should feel free and encouraged to change content, design, whatever!
2024-11-07 13:59:02 -05:00
During this process, `node` (20.08.0), `npm` , and `netcat` will be installed on your computer.
2024-10-13 11:31:10 -04:00
2024-10-13 12:15:37 -04:00
Please note the /status endpoint will be broken with the original servers as CORS is blocked on sites not requesting from my personal domain.
2024-10-13 11:31:10 -04:00
## Debian/Ubuntu/Other Debian-based systems
1. Clone the repo
```bash
git clone https://github.com/ihatenodejs/aidxnFUN
cd aidxnFUN
```
2. Setup `manage`
```bash
./manage setup
```
2024-11-07 13:59:02 -05:00
3. Start the server
2024-10-13 11:31:10 -04:00
```bash
./manage up
```
2024-10-21 20:25:23 -04:00
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.
2024-10-13 11:31:10 -04:00
## Windows
2024-11-07 18:58:04 -05:00
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 ](https://nodejs.org/ )
2. Open a Node.js command prompt
3. Clone the repo
```bat
git clone https://github.com/ihatenodejs/aidxnFUN
cd aidxnFUN
```
4. Build the app
```bat
npm run winbuild
```
5. Run the app on port 5566
```bat
set PORT=5566 & & node app.js
```
2024-11-07 23:59:35 +00:00
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.
2024-10-13 11:31:10 -04:00
# How it works
2024-11-07 13:59:02 -05:00
This website uses Node.js, Express.js for a server, EJS for templating, and Tailwind CSS for the frontend CSS.
2024-10-13 11:31:10 -04:00
The `manage` script uses all of those tools to manage the server for you executes the repetitive tasks for you automatically.
2024-10-15 19:48:19 -04:00
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.
2024-10-13 11:31:10 -04:00
Thus far, shards are included for a music widget, the header, and the footer of the pages.
2024-10-13 12:19:03 -04:00
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 ](https://github.com/biancarosa/lastfm-last-played ).
2024-10-12 19:24:15 -04:00
# 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:
```bash
chmod +x manage
./manage setup
```
After doing that, you are now ready to use the script.
2024-10-15 18:14:29 -04:00
## `manage` usage
`./manage [command] [options]`
2024-10-15 16:07:52 -04:00
## `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.
2024-10-15 19:47:15 -04:00
# Troubleshooting
2024-11-07 13:59:02 -05:00
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.
2024-10-15 19:47:15 -04:00
2024-10-15 14:02:56 -04:00
# To-Do
2024-11-07 09:30:38 -05:00
- [ ] Implement PGP message verification
2024-11-07 09:37:15 -05:00
- [X] Add menu link to tilde website
2024-11-04 19:08:08 -05:00
- [X] Update projects page to latest information
2024-10-16 10:57:36 -04:00
# License
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fihatenodejs%2FaidxnFUN?ref=badge_large)