Getting Started
Marko Run (@marko/run) is the application framework for Marko. It turns a directory of Marko templates into a full web application with file-based routing, nested layouts, middleware, streaming server-side rendering, and adapters for deploying to different platforms.
Marko Run is powered by Vite and works with zero configuration. The package ships with a default Vite config and a Node-based adapter, so a single +page.marko file is enough to serve an application.
Using a Template
Marko provides project templates through npm init marko, many of which use Marko Run.
npm init markoAfter choosing a template and project name:
cd PROJECT_NAME
npm run devManual Setup
Marko Run requires only one dependency in addition to marko, whether starting fresh or adding it to an existing Marko project.
Install the package
npm install @marko/runCreate the first page at
src/routes/+page.marko<h1>Hello Marko Run</h1>h1 -- Hello Marko RunStart the development server with the CLI
npm exec marko-run
The application is now available at http://localhost:3000 🚀
No Vite config file is required, and adapters are discovered automatically by package name. When a config file is needed, for example to set plugin options or register additional Vite plugins, see Marko Run's Vite plugin.
Next Steps
Contributors
Helpful? You can thank these awesome people! You can also edit this doc if you see any issues or want to improve it.