@thizjs/dev
v0.0.7
Published
The official development runtime for THIZ — a clean, fast backend framework.
Maintainers
Readme
@thizjs/dev
A blazingly fast, lightweight development server for THIZ.js — because you deserve better than slow, bloated watchers.
What is thiz?
@thizjs/dev is the official development runtime for THIZ.js — a clean, fast backend framework with file-based routing for Express. Thiz package provides hot-reloading for your server without the overhead of nodemon or other heavy watchers.
Features:
- ⚡ Lightning fast — restarts your server in milliseconds
- 🪶 Lightweight — minimal dependencies, maximum speed
- 🎨 Beautiful output — clean, colorful console logs
- 🔥 Smart watching — debounced restarts with intelligent file filtering
- 🛠️ Zero config — works out of the box with sensible defaults
Quick Start
If you're starting a new THIZ.js project:
npx create-thiz-app my-app
cd my-app
npm run devThat's it. You now have a production-ready MEN stack with file-based routing and hot-reloading.
👉 Learn more: create-thiz-app
Installation
For existing projects:
npm install --save-dev @thizjs/devAdd to your package.json:
{
"scripts": {
"dev": "thiz-dev"
}
}Run:
npm run devUsage
Command Line
The simplest way to use @thizjs/dev:
npx thiz-devBy default, it watches the src directory and runs src/server.js.
Programmatic API
Need more control? Use the programmatic API:
import { createWatcher } from '@thizjs/dev';
const watcher = createWatcher({
entry: 'src/server.js', // Entry point for your server
watch: 'src', // Directory/glob to watch
ignore: ['**/node_modules/**'], // Patterns to ignore
nodeArgs: ['--enable-source-maps'], // Node.js arguments
env: { PORT: 3000 }, // Environment variables
debounce: 150, // Restart debounce (ms)
verbose: false, // Detailed logging
});
watcher.start();
// Later...
// await watcher.stop();
// watcher.restart(); // Manual restartOptions
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| entry | string | "src/server.js" | Path to your server entry file |
| watch | string \| string[] | "src" | Paths or globs to watch for changes |
| ignore | string[] | ["**/node_modules/**", "**/.git/**"] | Patterns to ignore |
| nodeArgs | string[] | [] | Arguments to pass to Node.js (e.g., --inspect) |
| env | object | {} | Environment variables for the child process |
| debounce | number | 150 | Milliseconds to wait before restarting |
| verbose | boolean | false | Enable detailed logging |
Why Not Nodemon?
We love nodemon, but:
- Size matters: nodemon has many dependencies and features you might not need.
@thizjs/devis just 6.9KB. - Speed matters: Smart debouncing and minimal overhead mean faster restarts.
- Simplicity matters: Built specifically for THIZ.js workflows — no feature bloat.
How It Works
- Watches your source files using chokidar
- Detects changes with intelligent filtering (ignores
node_modules,.git, etc.) - Restarts your server gracefully with SIGTERM → SIGKILL fallback
- Debounces rapid changes to avoid restart spam
- Logs everything beautifully with chalk
Examples
Watch Multiple Directories
createWatcher({
watch: ['src', 'config', 'lib'],
}).start();Debug Mode
createWatcher({
nodeArgs: ['--inspect'],
verbose: true,
}).start();Custom Environment
createWatcher({
env: {
NODE_ENV: 'development',
DEBUG: 'app:*',
},
}).start();Contributing
We welcome contributions! If you find a bug or want to add a feature:
- Fork the repo: https://github.com/santhosh-2504/thizjs-dev
- Create a branch:
git checkout -b feature/amazing-thing - Commit your changes:
git commit -m 'Add amazing thing' - Push and open a PR
About THIZ.js
THIZ.js is an opinionated MEN (MongoDB, Express, Node.js) stack generator that gives you:
- 📁 File-based routing — no more route boilerplate
- 🚀 Zero config — sensible defaults that just work
- 🛠️ Production ready — built for scale from day one
Start building backends that don't suck:
npx create-thiz-app my-awesome-apiLicense
MIT © Santhosh Kumar Anantha
Made with ❤️ for developers who value speed and simplicity.
