From 412d641be37fe6c668f8546d46ab79ef587fcc6d Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Tue, 26 Nov 2024 15:36:10 -0500 Subject: [PATCH] Update App Development Guide --- App-Development-Guide.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/App-Development-Guide.md b/App-Development-Guide.md index 8e131fb..aeddda3 100644 --- a/App-Development-Guide.md +++ b/App-Development-Guide.md @@ -8,7 +8,7 @@ Of course we must start with a classic. ### app.js -``` +```js app.setDocument('

Hello, world!

'); ``` @@ -35,7 +35,7 @@ Let's take advantage of code running on the server and create a little hit count ### app.js -``` +```js async function main() { let db = await shared_database('visitors'); let count = parseInt((await db.get('visitors')) ?? '0') + 1; @@ -66,7 +66,7 @@ Suppose you don't want to create your entire app in a single server-side file as ### app.js -``` +```js async function main() { let html = utf8Decode(await getFile('index.html')); app.setDocument(html); @@ -77,7 +77,7 @@ main(); ### index.html -``` +```html @@ -90,7 +90,7 @@ main(); ### script.js -``` +```js window.addEventListener('load', function() { document.body.appendChild(document.createTextNode('Hello, world'); }); @@ -110,7 +110,7 @@ While making calls between the client and the server, it is possible to pass fun ### app.js -``` +```js import * as tf from '/tfrpc.js'; function sum() { @@ -130,7 +130,7 @@ main(); ### index.html -``` +```html

Calculating...

@@ -141,7 +141,7 @@ main(); ### script.js -``` +```js import * as tf from '/static/tfrpc.js'; window.addEventListener('load', async function() {