Installation
Get Query-2jz up and running in your project in minutes.
Prerequisites
Node.js
Node.js 18.0.0 or higher is required.
npm/yarn
Package manager for installing dependencies.
Database
SQLite, PostgreSQL, MySQL, or MongoDB.
Installation Methods
Method 1: Using the CLI (Recommended)
The easiest way to get started is using our CLI tool to initialize a new project.
# Install Query-2jz CLI globally
npm install -g query-2jz# Create a new project
cd my-app# Install dependencies
npm install# Start development server
query-2jz devMethod 2: Manual Installation
Install Query-2jz manually in your existing project.
# Install Query-2jz
npm install query-2jz# Or with yarn
yarn add query-2jz# Or with pnpm
pnpm add query-2jzDatabase Setup
Choose your database and configure the connection.
SQLite (Development)
Perfect for development and small applications
// query-2jz.config.js
module.exports = {
database: {
type: 'sqlite',
connection: './database.sqlite'
}
}PostgreSQL (Production)
Recommended for production applications
// query-2jz.config.js
module.exports = {
database: {
type: 'postgresql',
connection: process.env.DATABASE_URL
}
}MySQL
Great for web applications
// query-2jz.config.js
module.exports = {
database: {
type: 'mysql',
connection: {
host: 'localhost',
user: 'root',
password: 'password',
database: 'myapp'
}
}
}MongoDB
Perfect for document-based applications
// query-2jz.config.js
module.exports = {
database: {
type: 'mongodb',
connection: process.env.MONGODB_URI
}
}Framework Integration
Query-2jz works with all major Node.js frameworks. Choose your preferred framework:
Express.js
Most popular Node.js framework
Next.js
React framework with API routes
Fastify
Fast and low overhead framework
Koa
Expressive middleware framework
NestJS
Enterprise-grade framework
Hapi
Rich framework for building APIs
Verification
Verify your installation by running a simple test.
# Check Query-2jz version
query-2jz --version
# Test the installation
query-2jz init test-project
cd test-project
query-2jz dev
# You should see:
# 🚀 Query-2jz server running at http://localhost:3000
# Available endpoints:
# GET /api/query-2jz/:model - Query data
# POST /api/query-2jz/:model - Mutate data
# GET /health - Health checkNext Steps
Quick Start Guide
Learn the basics of Query-2jz in 5 minutes
Configuration
Learn how to configure Query-2jz for your needs