Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 11 months ago

Your web server having an interactive shell (REPL) where you can live update entries in your site/app’s database is pretty neat (if I do say so myself) :)

https://kitten.small-web.org/reference/#kitten-s-interactive-shell-repl

(I’m porting the Small Technology Foundation site¹ from Site.js² – and hence from being a static site generated via Site.js’s integrated Hugo³ – to Kitten⁴. In the process, I’m creating an admin panel⁵ for the news, events, and videos sections, which will make them easier to update, and storing the data in Kitten’s internal JavaScript Database⁶.)

¹ https://small-tech.org
² https://sitejs.org
³ https://gohugo.io/
⁴ https://kitten.small-web.org
⁵ It’s trivial to create authenticated routes in Kitten. You just add a lock emoji (🔒) to the end of your route’s name. e.g., admin🔒.page.js or /admin🔒/index.page.js (see https://kitten.small-web.org/reference/#sessions-and-authentication).
⁶ https://codeberg.org/small-tech/jsdb

#Kitten #REPL #shell #JavaScript #database #JavaScriptDatabase #JSDB #SmallTechnologyFoundation #SiteJS #Hugo #web #dev #NodeJS

Screenshot of Kitten’s interactive shell, showing me alterning a database entry in development:

}
  ]

🐱 💬 kitten.db.news[0].link = kitten.db.news[0].postLink

  'https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/'

🐱 💬 kitten.db.news[0]

  Proxy [
    News {
      link: 'https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/',
      title: 'New Kitten features: Interactive Shell (REPL), Multi-page Settings, and backup and restore (data portability)',
      date: '2024-05-23',
      image: '',
      summary: 'In this video, Aral demonstrates the new features added to Kitten in May: including the new Interactive Shell (REPL), Multi-page Settings, and backup and restore (data portability).',
      author: 'Aral Balkan',
      sourceName: 'Aral’s Blog',
      sourceLink: 'https://ar.al',
      postLink: 'https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/',
      presets: 'custom'
    },
    {
      get: [Function: bound getHandler] { boundObject: [DataProxy] },
      set: [Function: bound setHandler] { boundObject: [DataProxy] },
      defineProperty: [Function: bound definePropertyHandler] { boundObject: [DataProxy] },
      deleteProperty: [Function: bound deletePropertyHandler] { boundObject: [DataProxy] }
    }
  ]
Screenshot of Kitten’s interactive shell, showing me alterning a database entry in development: } ] 🐱 💬 kitten.db.news[0].link = kitten.db.news[0].postLink 'https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/' 🐱 💬 kitten.db.news[0] Proxy [ News { link: 'https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/', title: 'New Kitten features: Interactive Shell (REPL), Multi-page Settings, and backup and restore (data portability)', date: '2024-05-23', image: '', summary: 'In this video, Aral demonstrates the new features added to Kitten in May: including the new Interactive Shell (REPL), Multi-page Settings, and backup and restore (data portability).', author: 'Aral Balkan', sourceName: 'Aral’s Blog', sourceLink: 'https://ar.al', postLink: 'https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/', presets: 'custom' }, { get: [Function: bound getHandler] { boundObject: [DataProxy] }, set: [Function: bound setHandler] { boundObject: [DataProxy] }, defineProperty: [Function: bound definePropertyHandler] { boundObject: [DataProxy] }, deleteProperty: [Function: bound deletePropertyHandler] { boundObject: [DataProxy] } } ]
Screenshot of Kitten’s interactive shell, showing me alterning a database entry in development: } ] 🐱 💬 kitten.db.news[0].link = kitten.db.news[0].postLink 'https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/' 🐱 💬 kitten.db.news[0] Proxy [ News { link: 'https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/', title: 'New Kitten features: Interactive Shell (REPL), Multi-page Settings, and backup and restore (data portability)', date: '2024-05-23', image: '', summary: 'In this video, Aral demonstrates the new features added to Kitten in May: including the new Interactive Shell (REPL), Multi-page Settings, and backup and restore (data portability).', author: 'Aral Balkan', sourceName: 'Aral’s Blog', sourceLink: 'https://ar.al', postLink: 'https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/', presets: 'custom' }, { get: [Function: bound getHandler] { boundObject: [DataProxy] }, set: [Function: bound setHandler] { boundObject: [DataProxy] }, defineProperty: [Function: bound definePropertyHandler] { boundObject: [DataProxy] }, deleteProperty: [Function: bound deletePropertyHandler] { boundObject: [DataProxy] } } ]
Codeberg.org

jsdb

A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to a JavaScript transaction log.

Kitten: Reference

Kitten: Reference

  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-beta.35 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct