HazelJS Blog
Getting Started with HazelJS CLI
HazelJS Team
5/20/2024
General← Back to Blog
A step-by-step guide to using the HazelJS CLI for scaffolding and managing your projects.
Introduction
HazelJS is redefining the JavaScript runtime landscape with a focus on speed, security, and developer experience. In this article, we dive deep into the core innovations that set HazelJS apart and how you can leverage them in your next project.
Why HazelJS?
- Performance: Advanced JIT compilation and memory management deliver lightning-fast execution.
- Security: Built-in protections against common vulnerabilities, so you can ship with confidence.
- Developer Experience: TypeScript-first, modern APIs, and seamless tooling integration.
Getting Started Example
Here's how easy it is to spin up a HazelJS server:
import { HazelModule, HazelApp, Controller, Get } from 'hazeljs';
@Controller({ path: '/hello' })
class HelloController {
@Get()
hello() {
return { message: 'Hello, World!' };
}
}
@HazelModule({
controllers: [HelloController],
})
class AppModule {}
const app = new HazelApp(AppModule);
app.listen(3000);
Key Features
- Hot Reloading: Iterate faster with instant feedback.
- AI-First Design: Native support for LLMs and generative AI workflows.
- Zero-Config Deployments: Deploy globally with a single command.
"HazelJS has transformed our development workflow. The performance and security are unmatched."
— Early Adopter
Conclusion
Whether you're building APIs, web apps, or AI-powered services, HazelJS provides the foundation for modern, scalable, and secure JavaScript development. Join our community and help shape the future of JavaScript runtimes!