apprun-site icon indicating copy to clipboard operation
apprun-site copied to clipboard

AppRun Site, a framework for AppRun applications.

AppRun Site

AppRun-Site is a command-line tool for building modern web applications with AppRun. It consists of three features:

  • A build command compiles your code to ES Modules with esbuild
  • A build command option renders your pages to create a static website
  • A development server that supports your code run as Single Page Applications (SPA) and supports Server-Side Rendering (SSR)

It allows you to build website pages using HTML, markdown, and AppRun components.

Quick Start

To create an AppRun Site:

npx apprun-site init my-apprun-site
cd my-apprun-site
npm install

An AppRun-Site project has the following structure:

/public             <- static website
/pages              <- pages of the website
  /index.html       <- index page
  /index.md         <- home page
  /main.tsx         <- start up code (registers web component and renders the layout)
/components         <- optional
/api                <- optional

You can add pages to the directory pages; they can be HTML files, markdown files, and tsx/jsx files (AppRun components).

Then, you can use:

  • npm start to start the dev server
  • npm run build to build for production
  • npm run render to build a static website

Documentation

Please visit https://apprun.js.org/docs/apprun-site

Have fun coding!