docs/marko-run/getting-started.md
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.
Marko's CLI provides a variety of templates to get started with Marko, many of which use Marko Run.
npm init marko
The smallest possible Marko Run project requires just a few files.
npm init
npm install @marko/run
Marko Run can be added to an existing Marko project by installing the package.
npm install @marko/run
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:
npm install @marko/runsrc/routes/+page.markonpm exec marko-runThe application will be available at http://localhost:3000 🚀
marko-run devStarts a development server in watch mode
npm exec marko-run
or (with explicit sub command)
npm exec marko-run dev
marko-run buildCreates a production build
npm exec marko-run build
marko-run previewCreates a production build and start the preview server
npm exec marko-run preview