### Start Development Server with npm Source: https://github.com/erwinkn/pulse-ui/blob/main/examples/pulse-mantine/web/README.md Starts the development server, allowing for live reloading and immediate feedback during development. This command is typically used for local development and testing. ```bash npm run dev ``` -------------------------------- ### Install Dependencies with npm Source: https://github.com/erwinkn/pulse-ui/blob/main/examples/pulse-mantine/web/README.md Installs all necessary project dependencies using the npm package manager. This is a prerequisite for running the development server or building the project. ```bash npm install ``` -------------------------------- ### Example Pulse App Initialization and Run Source: https://github.com/erwinkn/pulse-ui/blob/main/docs/content/docs/reference/pulse/app.mdx Demonstrates how to create a Pulse application instance with defined routes and session timeout, and then run the development server. This example utilizes the `pulse` library for application setup. ```python import pulse as ps app = ps.App( routes=[ ps.Route("/", render=home), ps.Route("/users/:id", render=user_detail), ], session_timeout=120.0, ) if __name__ == "__main__": app.run(port=8000) ``` -------------------------------- ### Quick Start: Pulse App Initialization Source: https://github.com/erwinkn/pulse-ui/blob/main/skills/pulse/SKILL.md Demonstrates the basic structure of a Pulse application, including state management and component definition. This example shows how to initialize a stateful component and render it within a simple application structure. ```python import pulse as ps class Counter(ps.State): count: int = 0 def increment(self): self.count += 1 @ps.component def App(): with ps.init(): state = Counter() return ps.div( ps.button("Click", onClick=state.increment), ps.span(f"Count: {state.count}"), ) app = ps.App([ps.Route("/", App)]) ``` -------------------------------- ### Quick Start: Pulse UI Client React App Setup Source: https://github.com/erwinkn/pulse-ui/blob/main/docs/content/docs/reference/pulse-client/index.mdx This TypeScript example demonstrates a minimal React application setup using pulse-ui-client. It includes PulseProvider for connection management and PulseView for rendering UI components from a Pulse backend. ```tsx import { PulseProvider, PulseView } from "pulse-ui-client"; import { BrowserRouter, Routes, Route } from "react-router"; // Component registry for custom mount points const registry = { MyButton: (props) =>