# @ewb/mongoose-query-express

> Routes and controllers for express to handle mongoose queries

Latest version **1.2.0** (published 2026-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ewb/mongoose-query-express
pnpm add @ewb/mongoose-query-express
yarn add @ewb/mongoose-query-express
bun add @ewb/mongoose-query-express
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2026-03-16 |
| First published | 2023-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 24.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Emils Webbod |
| Maintainers | emilswebbod |
| Keywords | typescript, npm, translate |

## Links

- npm: https://www.npmjs.com/package/@ewb/mongoose-query-express
- Repository: https://github.com/emilswebbod/mongoose-query-express
- Homepage: https://github.com/emilswebbod/mongoose-query-express#readme
- Issues: https://github.com/emilswebbod/mongoose-query-express/issues
- npm.io page: https://npm.io/package/@ewb/mongoose-query-express

## Dependencies (1)

- [http-status](https://npm.io/package/http-status.md) ^2.1.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2026-03-16
- 1.1.2 — 2025-06-23
- 1.1.1 — 2025-05-04
- 1.1.0 — 2024-06-15
- 1.0.8 — 2023-11-20
- 0.1.3 — 2023-11-20
- 1.0.7 — 2023-09-14
- 1.0.6 — 2023-07-04
- 1.0.5 — 2023-06-11
- 1.0.4 — 2023-06-11
- 1.0.3 — 2023-06-11
- 1.0.2 — 2023-06-07
- 1.0.1 — 2023-06-07
- 1.0.0 — 2023-06-07
- 0.1.2 — 2023-06-05
- … 6 more at https://npm.io/package/@ewb/mongoose-query-express/versions

## README

## Mongoose Query Express

### Info
Library to for Express to create simple reusable queries and logic for mongoose.\
Never write the simple get, post, patch and delete function over and over again.\

Used in combination with [mongoose-query](https://github.com/EmilsWebbod/mongoose-query) to create the model logic.\

### Usage
```
import { QueryExpress, QueryModel, QueryOptions } from 'mongoose-query-express';

const options = new QueryOptions({ .... });
const userQueryModel = new QueryModel<User>(User, options);
const userQuery = new QueryExpress('user', userQueryModel, {...});

const user = express();

user.param('id', userQuery.param);
user.get('/', userQuery.get);
user.post('/', userQuery.post);
user.patch('/:id', userQuery.patch);
user.delete('/:id', userQuery.delete); // Can also use userQuery.archive if archive option set.
```

---
_Source: https://npm.io/package/@ewb/mongoose-query-express · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
