Skip to content

Local Development Blueprint

This guide provides the "Happy Path" for bootstrapping and running your generated project locally. Each configuration matches the instructions found in the generated README.md.

PREREQUISITES

Before starting, ensure you have the following installed:

  • Node.js (v18+)
  • Docker & Docker Compose (for infrastructure like Databases, Redis, and Kafka)

The 7-Step Development Flow

To ensure your microservice is production-ready, follow this standard sequence:

StepGoalActionWhy?
Step 1Initialize Gitgit initEnables Husky hooks and security gates.
Step 2Install Depsnpm installDownloads core project dependencies.
Step 3Setup Envcp .env.example .envConfigures local environment variables.
Step 4Launch Infradocker-compose up -dStarts DB, Redis, and Kafka in background.
Step 5Run Devnpm run devLaunches the app in hot-reload mode.
Step 6Quality Gatenpm testVerifies code quality and unit tests.
Step 7Ship projectnpm run deployBuilds and deploys via PM2/Cluster mode.

Detailed Setup

1. Environment Configuration

Copy the example environment file and adjust values:

bash
cp .env.example .env

2. Infrastructure & App Launch

Choose the infrastructure setup that matches your generated project:

bash
# Initialize repository
git init && npm install

# Start all infrastructure
docker-compose up -d db redis kafka

# Start the application
npm run dev
bash
# Initialize repository
git init && npm install

# Start MongoDB
docker-compose up -d db

# Start the application
npm run dev
bash
# Initialize repository
git init && npm install

# Start Redis and DB
docker-compose up -d db redis

# Start the application
npm run dev
bash
# Initialize repository
git init && npm install

# Start the application directly
npm run dev

PRO TIP

Running docker-compose up -d without specifying services will start all infrastructure defined in your docker-compose.yml.

Released under the ISC License.
Built with for the Node.js Ecosystem. NPM Downloads GitHub Stars