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.
To create a new AppRun Site, run npm init apprun-app
command and select the AppRun Site
template.
npm init apprun-app [my-app]
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 preview server
- npm run dev to start the dev server
- npm run build to build for production
- npm run render to build a static website
Please visit https://apprun.js.org/docs/apprun-site
Have fun coding!