-- Leo's gemini proxy

-- Connecting to gemini.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

now on glitch.com


(kind of a side-quest that I'm not using for the git-gud "create world" task)


previous

next


so I had never used glitch.com before starting this, so this was mostly just me fumbling my way around until it worked.

I didn't know that the presence of package.json in /app would either enable or disable node and npm.

Since we only need npm for building janusweb, we'll have to flip between these two types of glitches when we want to test.

Which is kind of annoying.

We can't drop janusweb directly into /app or else janusweb's package.json makes the container do funky stuff.

First step is to clone the git repo into /app/janusweb and we'll let it live there.

Then delete the .git dir to save space. We've only got 200 MB and that is a bit cramped with all of the bells and whistles.

Before doing the first step of the install, we need to edit some of the utils scripts, and the scripts/config.js


The cp -al lines in init.sh and build.sh need to be changed to cp -a since hard links can't cross file systems and glitch is being clever.

This will take up a bit more space, but not enough to be a problem atm.


We can remove the tar line at the end of build.sh since we won't need the release tgz and it will fill up the remaining space and error-out.


These seem to be the only things that you need to be sure are set this way in the scripts/config.js file.

elation.config.set('dependencies.protocol', 'https:');                           // "http:" or "https:"
elation.config.set('dependencies.host', 'pacific-organic-cornflower.glitch.me'); // Hostname this release will live on
elation.config.set('dependencies.rootdir', '/latest');                           // Directory this release will live in
elation.config.set('dependencies.main', 'scripts/utils/elation.js');             // The main script file for this release
elation.config.set('share.imagebase', 'media/images/share/');

Then we do the build steps like normal.

npm install --only=prod
npm run build

I put a symlink in /app to /app/janusweb/build/1.5.43/ named 'latest' so we could reference janusweb.js by the /latest/janusweb.js path.

Now, we make the glitch go from app to static-site-mode by renaming the package.json file and doing 'refresh'. not sure how important the refresh is.


Here's what I ended up with:


https://pacific-organic-cornflower.glitch.me/

-- Response ended

-- Page fetched on Sun May 12 10:32:33 2024