Skip to content

Skip updating instances, with optional env variable#318

Open
e-lisa wants to merge 1 commit intoMathMan05:mainfrom
e-lisa:feat-skip-instances
Open

Skip updating instances, with optional env variable#318
e-lisa wants to merge 1 commit intoMathMan05:mainfrom
e-lisa:feat-skip-instances

Conversation

@e-lisa
Copy link
Copy Markdown

@e-lisa e-lisa commented Apr 1, 2026

Description

Skip updating the instance JSON in favor of what is already in dist/webpage/instances.json

This is useful for instances that run standalone, and do not want to be part of the spacebar-instance selection

skip updating the instance JSON in favor of what is already in
`dist/webpage/instances.json`
@MathMan05
Copy link
Copy Markdown
Owner

Heya, two things:
firstly, you probably should do !!process.env.SKIP_INSTANCE_UPDATE, just converting to truth-y.
Secondly, you might think about statically hosting, as using the nodejs server is kinda overkill if you don't care about uptime stats like in your case.
(I will merge no matter what if you just change this as suggested, unless you think it being defined does not mean it's disabled in some case)

@MathMan05
Copy link
Copy Markdown
Owner

Also if you do wish for a set varriable to mean something other than it's active, I'd change this line

const skipinstances = (process.env.SKIP_INSTANCE_UPDATE || false) === '1';

to something more like

const skipinstances = process.env.SKIP_INSTANCE_UPDATE === '1';

There's no need to make it false there. (also the nullish coalescing operator would be preferred in most cases ?? )

@MathMan05
Copy link
Copy Markdown
Owner

Also, unrelated to this pull request, this functionality might be worth stripping from Fermi at all given that that list is at the very least on the cusp of being deprecated, and with statically hosted instances not using it,

@oh64
Copy link
Copy Markdown

oh64 commented Apr 2, 2026

You can maybe pull the instances and their details from the Explorer
https://spacebar-explorer.sovr.top/docs

@MathMan05
Copy link
Copy Markdown
Owner

prob not, it's maintained outside of spacebar/fermi and whatnot

@MathMan05
Copy link
Copy Markdown
Owner

(plus keeping a better list has been an idea for me for a while, as well a a whole client logic thing, if a fork happens, I'll very likely start that up or something)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants