Getting Started
This guide walks through creating and running a new StruxJS application.
Prerequisites
Ensure your system meets the following requirements before installing StruxJS:
- Node.js: Version 18.0.0 or higher
- Package Manager: npm (v9+), pnpm, or yarn
Creating a New Project
Use npx create-struxjs-app to scaffold a new application. The CLI automatically sets up the project directory, installs required dependencies, and configures default environment variables:
npx create-struxjs-app my-appAlternatively, run:
npm create strux-app@latest my-appOnce installation completes, navigate to your project directory:
cd my-appRunning the Application
Development Mode
Start the backend application server with live reload enabled:
npm run devThe application server will boot and listen at http://localhost:3000.
Development Assets Mode
To compile and hot-reload frontend assets (Vite / Tailwind CSS) during development, run:
npm run dev:assetsProduction Deployment
Building Backend Code
Compile TypeScript source files for production:
npm run buildStart the compiled backend production server:
npm startBuilding Frontend Assets
Compile and minify frontend assets for production:
npm run build:assets