webAppForRDSBlueGreenmain.tsx8 matches
2829const [selectedInstance, setSelectedInstance] = useState(instanceTypes[0]);
30const [numberOfDatabases, setNumberOfDatabases] = useState(2);
3132const calculateParameters = (instance, dbCount) => {
64value: max_replication_slots,
65description: 'Maximum number of replication slots',
66recommendation: 'Should be 2+ more than number of databases'
67},
68max_wal_sender: {
8788const parameters = useMemo(() =>
89calculateParameters(selectedInstance, numberOfDatabases),
90[selectedInstance, numberOfDatabases]
91);
92148
149<div style={{ flex: 1 }}>
150<label style={{ display: 'block', marginBottom: '5px' }}>Number of Databases</label>
151<input
152type="number"
153value={numberOfDatabases}
154min="1"
155max="50"
156onChange={(e) => setNumberOfDatabases(Number(e.target.value))}
157style={{
158width: '100%',
234</h3>
235<ul style={{ paddingLeft: '20px' }}>
236<li>Parameters are dynamically calculated based on instance vCPUs and database count</li>
237<li>Calculations ensure proper scaling for replication and background processes</li>
238<li>Always validate these recommendations in your specific environment</li>
sqlite_adminREADME.md1 match
7It's currently super limited (no pagination, editing data, data-type specific viewers), and is just a couple dozens lines of code over a couple different vals. Forks encouraged! Just comment on the val if you add any features that you want to share.
89To use it on your own Val Town SQLite database, [fork it](https://www.val.town/v/stevekrouse/sqlite_admin/fork) to your account.
1011It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
1# SQLite - [Docs ↗](https://docs.val.town/std/sqlite)
23[SQLite](https://www.sqlite.org/) is a lightweight, standard database. Every Val Town account comes with its own private SQLite database that is accessible from any of your vals via [`std/sqlite`](https://www.val.town/v/std/sqlite).
45Val Town SQLite is powered by [Turso](https://turso.tech/).
9* [ORMs](https://docs.val.town/std/sqlite/orms)
1011We recommend these admin data viewers for managing your database – viewing or editing data or your database table schema:
1213* [Outerbase Studio](https://libsqlstudio.com/) **(recommended)** - formely known as LibSQL Studio – see instructions [here](https://libsqlstudio.com/docs/connect-valtown)
5/**
6* Every Val Town account comes with its own private
7* [SQLite database](https://www.sqlite.org/) that
8* is accessible from any of your vals.
9* ([Docs ↗](https://docs.val.town/std/sqlite))
1# Uptime Checker & Status Page
23This is a free, hackable uptime/downtime monitor that sends you an email when the site doesn't return a 200. It also stores historical uptime and latency data in your Val Town SQLite, which is used to power a status page. It supports multiple URLs in the same database and status page.
45## Installation
1# Uptime Checker & Status Page
23This is a free, hackable uptime/downtime monitor that sends you an email when the site doesn't return a 200. It also stores historical uptime and latency data in your Val Town SQLite, which is used to power a status page. It supports multiple URLs in the same database and status page.
45## Installation
karate_classesmain.tsx1 match
701const SCHEMA_VERSION = 2;
702703// Set up database tables
704await sqlite.execute(`
705CREATE TABLE IF NOT EXISTS ${KEY}_students_${SCHEMA_VERSION} (
103},
104{
105Name: 'malformed PasswordHash in database',
106TableName,
107AuthHeader:'Basic ' + btoa('isaac:correctPassword'),
Authorization_from_SQLite_TestREADME.md11 matches
71. **Valid credentials with existing user**
8- TableName: "Authorization_from_SQLite_Test"
9- Database content: UserId "alice", PasswordHash "{PBKDF2}10000$salt123$hashedPassword123"
10- Authorization header: "Basic " + btoa("alice:correctPassword")
11- Expected result: true
132. **Valid credentials with case-insensitive UserId**
14- TableName: "Authorization_from_SQLite_Test"
15- Database content: UserId "Bob", PasswordHash "{PBKDF2}10000$salt456$hashedPassword456"
16- Authorization header: "Basic " + btoa("bob:correctPassword")
17- Expected result: true
213. **Invalid password**
22- TableName: "Authorization_from_SQLite_Test"
23- Database content: UserId "charlie", PasswordHash "{PBKDF2}10000$salt789$hashedPassword789"
24- Authorization header: "Basic " + btoa("charlie:wrongPassword")
25- Expected result: false
274. **No Authorization header**
28- TableName: "Authorization_from_SQLite_Test"
29- Database content: UserId "david", PasswordHash "{PBKDF2}10000$saltABC$hashedPasswordABC"
30- Authorization header: undefined
31- Expected result: false
335. **Non-existent user**
34- TableName: "Authorization_from_SQLite_Test"
35- Database content: (empty)
36- Authorization header: "Basic " + btoa("eve:anyPassword")
37- Expected result: false
487. **Empty string as password**
49- TableName: "Authorization_from_SQLite_Test"
50- Database content: UserId "grace", PasswordHash "{PBKDF2}10000$saltDEF$hashedEmptyPassword"
51- Authorization header: "Basic " + btoa("grace:")
52- Expected result: true (if the empty password hashes correctly)
548. **Non-Basic authorization type**
55- TableName: "Authorization_from_SQLite_Test"
56- Database content: UserId "henry", PasswordHash "{PBKDF2}10000$saltGHI$hashedPasswordGHI"
57- Authorization header: "Bearer " + btoa("henry:password")
58- Expected result: false
59609. **Malformed PasswordHash in database**
61- TableName: "Authorization_from_SQLite_Test"
62- Database content: UserId "isaac", PasswordHash "malformedHash"
63- Authorization header: "Basic " + btoa("isaac:password")
64- Expected result: false
6610. **Very long UserId (at 256 character limit)**
67- TableName: "Authorization_from_SQLite_Test"
68- Database content: UserId (256 'a' characters), PasswordHash "{PBKDF2}10000$saltJKL$hashedPasswordJKL"
69- Authorization header: "Basic " + btoa("a".repeat(256) + ":password")
70- Expected result: true (if password is correct)
73- TableName: "Authorization_from_SQLite_Test"
74- Authorization header: "Basic " + btoa("a".repeat(257) + ":password")
75- Expected result: false (as it shouldn't exist in the database)
767712. **Empty UserId**
trackESMContentmain.tsx3 matches
15}
1617async function initializeDatabase() {
18await sqlite.execute(`
19CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
2728export default async function(interval: Interval) {
29await initializeDatabase();
3031for (const url of URLS) {
6566export async function getAllVersions() {
67await initializeDatabase();
68const versions = await sqlite.execute(`SELECT * FROM ${TABLE_NAME} ORDER BY timestamp DESC`);
69console.log(versions, TABLE_NAME);