Production Build
Build and run your AbsoluteJS application in production with optimized bundles and proper process management.
#Building for Production
The build command bundles all your frontend code, generates hashed asset filenames for cache busting, and creates the manifest file for asset lookup:
# Build for production using the CLI
absolute start src/backend/server.ts
# This runs the build from absolute.config.ts which:
# 1. Bundles all frontend code
# 2. Generates hashed asset filenames
# 3. Creates the manifest for asset lookup
# 4. Starts the production serverBundled Assets
All frontend code is bundled and minified for optimal load times.
Cache Busting
Hashed filenames ensure browsers always get the latest version.
#Profiling the Build
When a build feels slow, run absolute build --profile to see where the time goes. It prints the slowest phases and a per-framework rollup, so you can tell whether a single framework's compile or a particular bundle is the bottleneck before you start optimizing.
$ absolute build --profile
✓ built in 4.21s
Slowest phases
angular ssr compile 1.84s
vue bundle 0.97s
react bundle 0.61s
svelte bundle 0.42s
assets + manifest 0.18s
By framework
angular 2.10s react 0.61s vue 0.97s svelte 0.42s#Running in Production
Start your production server directly with Bun, or use a process manager like PM2 for automatic restarts and clustering:
# Or build and start separately
bun run build
bun run src/backend/server.ts
# Or with PM2 for process management
pm2 start bun --name "my-app" -- run src/backend/server.ts