Create Your First App
Every directory in your Smallweb folder automatically becomes a live website. Let's create a simple "Hello World" app.
Create the App Directory
mkdir ~/smallweb/hello
Add a Main File
Create a main.ts file with a fetch handler:
// ~/smallweb/hello/main.ts
export default {
fetch: (request: Request) => {
return new Response("Hello, World!");
}
}
Access Your App
Your app is now live at https://hello.yourdomain.com (or whatever domain you've configured).
What's Next?
- Learn about app structure
- Explore static file serving