Getting Started
This page takes you from zero to a running Resux app.
Requirements
Resux requires Node >=20.19.0 for the framework package. The docs site itself only needs Node 18+, but generated Resux apps should use the framework requirement.
Current npm latest for resuxjs is 0.2.23 (checked on 2026-05-07).
Check your version:
node --versionCreate a new app
npx resuxjs@latest init my-app
cd my-app
npm install
npm run devOpen the local URL printed by the command.
Create options
Create in a named directory:
npx resuxjs@latest init my-appSkip install:
npx resuxjs@latest init my-app --no-installChoose a package manager for the generated next steps:
npx resuxjs@latest init my-app --package-manager pnpm
npx resuxjs@latest init my-app --pm bunOverwrite a non-empty target directory:
npx resuxjs@latest init my-app --forceAccept defaults without prompts:
npx resuxjs@latest init my-app --yesGenerated package scripts
A generated app uses a single dependency on resuxjs and scripts like these:
{
"scripts": {
"dev": "resux dev .",
"build": "resux build .",
"preview": "resux preview .",
"start": "node .output/server/index.mjs",
"inspect": "resux inspect ."
}
}Your first page
Create pages/index.vue:
<script setup lang="ts">
useSeoMeta({
title: 'Home',
description: 'My first Resux app'
})
const count = useState('count', () => 0)
function increment() {
count.value++
}
</script>
<template>
<main>
<h1>Hello Resux</h1>
<button @click="increment">Clicked {{ count }} times</button>
</main>
</template>The template can read count directly because templates auto-unwrap Resux refs. In script, mutate refs through .value.
Build for production
npm run build
npm run startresux build writes lower-level Resux output to .resux and a Nitro production server to .output.
Inspect a build
npm run inspect
npm run inspect -- --jsonUse inspect output to debug discovered routes, components, layouts, plugins, middleware, server handlers, route rules, features, and diagnostics.