JS framework for rad web apps
Find a file
2025-08-15 14:42:46 +00:00
backend better error handling (now wrapping user-defined functions with try/catch), better frontend logging (debug replaces info) 2025-08-15 14:40:27 +00:00
frontend better error handling (now wrapping user-defined functions with try/catch), better frontend logging (debug replaces info) 2025-08-15 14:40:27 +00:00
package.json first commit 🤘 2025-08-12 22:47:53 +00:00
README.md updated README.md to include minimal example of usage 2025-08-15 14:42:46 +00:00

framerock

JS framework for rad web apps

a minimal example:

import { async_run } from 'framerock'

const jsbuild_app_frontend = async function () {
	const str_js = `
const on_open = function () {
	FRAMEROCK_UTILS.transport_send_bytes('Hello from client!')
	return
}
const on_message = function (data) {
	console.log(['Client received message:', data])
	return
}
FRAMEROCK_UTILS.setup_transport({ on_open, on_message })
`.trim()
	return str_js
}

const handle_transport_bytes = function (utils, message) {
	console.log(['Server received message:', message])
	utils.transport_send_bytes('Hello from server!')
	return
}

const config = {
	hostname: '0.0.0.0',
	port: 8800,
	page_title: 'framerock demo',
}

async_run({ config, jsbuild_app_frontend, handle_transport_bytes }).then(()=>{}).catch(console.error)