Getting Started
Marko Run is a framework for building web applications with Marko. This is a meta-framework for Marko, similar to Next.js or Remix for React, SvelteKit for Svelte, and Nuxt for Vue.
Marko Run is powered by Vite, a fast and modern build tool that provides a great developer experience. It is designed to be easy to use and flexible, allowing developers to build applications with Marko quickly and efficiently.
Using a Template
Marko's CLI provides a variety of templates to get started with Marko, many of which use Marko Run.
npm init marko
Starting from Zero
The smallest possible Marko Run project requires just a few files.
npm init
npm install @marko/run
Adding to an Existing Project
Marko Run can be added to an existing Marko project by installing the package.
npm install @marko/run
Zero Config Setup
marko-run
enables quick project initialization with minimal configuration. The package ships with a default Vite config and node-based adapter.
Starting with a template:
Create a new project
npm init marko -- -t basic
Navigate to project directory
cd PROJECT_NAME
Start development server
npm run dev
Manual project setup:
- Install the required package:
npm install @marko/run
- Create the entry file:
src/routes/+page.marko
- Start the development server:
npm exec marko-run
The application will be available at http://localhost:3000
🚀
CLI Commands
marko-run dev
Starts a development server in watch mode
npm exec marko-run
or (with explicit sub command)
npm exec marko-run dev
marko-run build
Creates a production build
npm exec marko-run build
marko-run preview
Creates a production build and start the preview server
npm exec marko-run preview
Contributors
Helpful? You can thank these awesome people! You can also edit this doc if you see any issues or want to improve it.