create-barejs
v1.0.1
Published
Official starter kit for the high-performance BareJS framework
Downloads
7
Maintainers
Readme
create-barejs
The official scaffolding tool for BareJS — an ultra-high-performance web engine architected for Bun and built for Mechanical Sympathy.
Why BareJS?
BareJS isn't just another framework; it's a specialized engine built to eliminate overhead at every layer of the HTTP lifecycle.
- JIT Route Compilation: Routes and middleware chains are flattened into a single, high-speed execution path at startup.
- Object Pooling: Eliminates Garbage Collection (GC) spikes by recycling the
Contextobject through a pre-allocated circular pool. - Lazy Body Parsing: Maintains nanosecond-level latency for GET requests by only parsing JSON payloads on-demand via
ctx.jsonBody(). - Zero-Dependency Core: Leverages Bun's native APIs for maximum optimization without the bloat.
Quick Start
Initialize a new high-performance project instantly using the Bun CLI. No global installation required.
bun create barejs my-awesome-app
What's Inside?
Running this command generates a production-ready boilerplate including:
index.ts: Optimized starter code with GET, Parametric, and POST routes.tsconfig.json: Pre-configured for Bun types and strict TypeScript safety.- Object-Pool Ready: Pre-tuned environment for high-concurrency workloads.
Development
Once created, navigate to your folder and start the development server with hot-reloading:
cd my-awesome-app
bun dev
📘 Documentation
For advanced usage, including JWT Authentication, Data Validation (TypeBox/Zod), and Middleware Orchestration, please visit the main BareJS Repository.
**Maintained by xarhang | License: MIT
