npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

west-js-app

v3.1.0

Published

A progressive CLI framework for building robust Express.js backends.

Readme

W E S T . J S

Scaffold production-ready Express 5 + TypeScript projects in seconds. Pick a database ORM, add Docker, and start building.

npm version license node tests


npx west-js-app

Why west.js?

Starting a new Express project means wiring up TypeScript, linting, testing, error handling, env config, and more — every single time. west.js does all of that in one command.

  • Express 5 — native async error handling, no wrappers needed
  • TypeScript — strict mode, path resolution, source maps
  • Database — Prisma 7, Drizzle, or TypeORM with PostgreSQL, MySQL, or SQLite
  • Docker — multi-stage Dockerfile + compose with DB health checks
  • Testing — Jest + Supertest with real HTTP assertions
  • Linting — ESLint flat config + Prettier, pre-commit hooks via Husky
  • Deploy — Vercel config included out of the box

Quick Start

npx west-js-app

Follow the interactive prompts — or skip them entirely:

npx west-js-app --yes --name my-api --database prisma --db-provider postgresql --docker

Then:

cd my-api
npm run dev

Your API is running at http://localhost:3000.


CLI Options

Usage: npx west-js-app [options]

Options:
  --name <name>              Project name (kebab-case)
  --database <orm>           prisma | drizzle | typeorm | none
  --db-provider <db>         postgresql | mysql | sqlite
  --docker                   Enable Docker support
  --no-docker                Disable Docker support
  --package-manager <pm>     npm | pnpm | yarn
  -y, --yes                  Skip all prompts, use defaults
  -v, --version              Show version
  -h, --help                 Show help

What gets generated.

my-api/
├── src/
│   ├── app.ts                    # Express app setup (cors, helmet, middlewares)
│   ├── server.ts                 # Server entry point with graceful shutdown
│   ├── routes/
│   │   ├── health.ts             # GET /health — liveness probe
│   │   └── example.ts            # Example CRUD route
│   ├── middleware/
│   │   ├── error-handler.ts      # Centralized error handling
│   │   ├── validate.ts           # Zod request validation middleware
│   │   └── rate-limit.ts         # express-rate-limit global limiter
│   ├── config/
│   │   └── env.ts                # Type-safe env validation
│   └── lib/
│       ├── errors.ts             # Custom error classes
│       └── logger.ts             # Pino structured logger
├── tests/
│   ├── app.test.ts               # App integration tests
│   └── example.test.ts           # Route unit tests
├── .husky/
│   └── pre-commit                # Runs lint-staged on commit
├── package.json
├── tsconfig.json
├── eslint.config.mjs
├── .prettierrc
├── jest.config.js
├── .gitignore
├── .env
├── .env.example
└── vercel.json

Scripts in Generated Project

| Script | Description | | --------------------- | -------------------------- | | npm run dev | Dev server with hot reload | | npm run build | Compile TypeScript | | npm start | Run production build | | npm test | Run tests | | npm run lint | Lint with ESLint | | npm run format | Format with Prettier | | npm run db:generate | Generate database client | | npm run db:migrate | Run migrations (if DB) | | npm run db:studio | Database GUI (if DB) |


When you add a database, extra files are generated:

# Prisma
├── prisma/
│   └── schema.prisma
├── prisma.config.ts
└── src/lib/prisma.ts

# Drizzle
├── drizzle.config.ts
└── src/db/
    ├── index.ts
    └── schema.ts

# TypeORM
└── src/db/
    ├── data-source.ts
    ├── index.ts
    └── entities/
        └── user.ts

When you enable Docker:

├── Dockerfile                    # Multi-stage production build
├── docker-compose.yml            # App + database services
└── .dockerignore

Environment Variables

The generated src/config/env.ts validates all environment variables at startup with a clean, type-safe pattern:

// Auto-validates on boot — crashes fast if misconfigured
export const env = {
  PORT: ...,
  NODE_ENV: ...,
  DATABASE_URL: ...,   // only if a database is selected
  RATE_LIMIT_WINDOW_MS: ...,
  RATE_LIMIT_MAX: ...,
};

The generated .env:

PORT=3000
NODE_ENV=development
DATABASE_URL=postgresql://user:password@localhost:5432/mydb?schema=public

RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX=100

🌐 API Endpoints (Generated)

| Method | Path | Description | | -------- | ------------------- | ------------------------- | | GET | / | Welcome message + version | | GET | /health | Liveness probe | | GET | /api/examples | List all examples | | GET | /api/examples/:id | Get example by ID | | POST | /api/examples | Create example | | DELETE | /api/examples/:id | Delete example |


Git Hooks

A pre-commit hook via Husky runs lint-staged on every commit:

# pnpm projects
pnpm exec lint-staged

# npm/yarn projects
npx lint-staged

Contributing

# Clone
git clone https://github.com/vishalvoid/west.js.git
cd west.js

# Install dependencies
pnpm install

# Run CLI tests
pnpm -F cli run test

# Build CLI
pnpm -F cli run build

# Try it locally
node packages/cli/dist/index.js --help

📄 License

MIT © vishalvoid


Made with ❤️ by vishalvoid

⭐ Star the repo if this saved you time → west.js