Back to packages list

Vals using hono

Description from the NPM package:
Web framework built on Web Standards
hunty avatar
hunty
bumpyGreenAntelope
HTTP
Forked from hunty/Fetch
0
dthyresson avatar
dthyresson
viewOnValTownComponent
HTTP
View on Val Town Give url and, link to your val!
0
vawogbemi avatar
vawogbemi
short
HTTP
Short URLs A URL shortener in Val Town! This turns URLs into strings like https://vawogbemi-short.web.val.run/JK An implementation of https://www.val.town/v/tmcw/short It uses SQL instead of express persistent storage. Table Schema Short(id INT, url TEXT)
1
samwho avatar
samwho
featureflags
HTTP
Feature Flags This val demonstrates a very simple feature flag implementation. There is a const in the file called FLAGS which stores the feature flags defined, fork this val and modify this value to setup your own flags. Defining flags The example FLAGS value is: const FLAGS: Record<string, Flag> = { "flag1": Flag.rollout(0.5), "flag2": Flag.enabled().block("user_123"), "flag3": Flag.disabled().allow("hello@samwho.dev"), }; This demonstrates: flag1 -- a flag that will be enabled for 50% of users (more on how users are defined later) flag2 -- a flag that is enabled for everyone except user_123 flag3 -- a flag that is disabled for everyone except hello@samwho.dev Endpoints There are two endpoints: / -- the root endpoint fetches all flags for the given user. /:id -- fetches just one flag value, given by :id , for the given user. Specifying users By default, the user is determined by IP address. If you want to be more specific, you can pass in the ?userId query parameter to any endpoint and that will be used instead. How it works This val works by hashing the userId and using the resulting value to determine whether a flag should be enabled or disabled. In a 50% rollout, for example, the numeric hash of the userId is taken and divided by the maximum hash value. If the result is less than the rollout percentage, the flag is enabled. This allows for completely stateless feature flags, no database required. To prevent the same users getting features first all of the time, the flag name is prepended to the userId before hashing.
1
dthyresson avatar
dthyresson
movieMashup
HTTP
Movie Mashup It's Blader Runner meets Pretty in Pink. OpenAI generated movie maship title, tagline and treatments. Fal generated movie posters.
1
kamalnrf avatar
kamalnrf
sqliteAdmin
HTTP
Forked from nbbaier/sqliteExplorerApp
0
nickgolden avatar
nickgolden
sqliteExplorerApp
HTTP
Forked from nbbaier/sqliteExplorerApp
0
hunty avatar
hunty
Fetch
HTTP
Fetch Template Example template to quickly get started with a backend for Fetch in Framer.
0
dthyresson avatar
dthyresson
playRandomSong
HTTP
Play a Random Song ... from a set of Spotify tracks that have been played by me or others using the playMeASong val. Queries a random record of a tracks table and redirects to it's Spotify url. Usage // random const track = await getRandomTrack(); // random for artist const track = await getRandomTrack("Pixies");
0
tempguy avatar
tempguy
anime
HTTP
@jsxImportSource npm:hono@3/jsx
0
cjlm avatar
cjlm
sqliteExplorerApp
HTTP
Forked from nbbaier/sqliteExplorerApp
0
stevekrouse avatar
stevekrouse
switchbot
HTTP
Open the Val Town Office Doors with Switchbot We installed two switchbot robots in our office: Ground Floor Office Door This webpage will let Val Town employees or guests to use these bots. The original version of this val was for a party. That fork is preserved here: @stevekrouse/switchbot_party Next steps [ ] Remove party theme [ ] Add one of @pomdtr's login methods [ ] Allow all @val.town emails to login [ ] Have any other email login ping me for approval or make a private val with a list of approved emails [ ] Add the office door to the site [ ] Add instructions (ie turn off wifi completely downstairs; be gentle with the office door one) Switchbot API This val authenticates to the switchbot API with SWITCHBOT_TOKEN and SWITCHBOT_KEY . Learn how to get your own Switchbot API keys here: Switchbot Docs .
0
keenanzucker avatar
keenanzucker
blobCommentsReact
HTTP
Forked from stevekrouse/blobCommentsReact
0
kylem avatar
kylem
dependencyLicenses
HTTP
Forked from kylem/gitReleaseNotes
0
stevekrouse avatar
stevekrouse
Jumpchain_Website
HTTP
Forked from willthereader/Jumpchain_Website
0
tmcw avatar
tmcw
pinkGalliform
HTTP
Forked from tmcw/hackernewstopstory
1