
Neex V-0.7.45: A Powerful Fusion of Next.js and Express for Fullstack Development
Neex is a modern and advanced fullstack framework that combines Next.js and Express to deliver an exceptional development experience. Designed for speed, simplicity, and scalability, Neex empowers developers to effortlessly build and deploy robust, high-performance applications.
Unlock the full potential of your fullstack projects with Neexβs powerful features, tailored for modern web development:
package.json to ensure modular and scalable development.dotenv to handle environment variables safely and efficiently.With these features, Neex is the ideal choice for developers seeking a fullstack framework thatβs SEO-optimized, scalable, efficient, and developer-friendly. Start building high-performance web applications today with Neexβs robust toolset and clean architecture.
Run one of the creation commands:
bashnpx neex init # or npx create-neex
Enter your project name (e.g., my-awesome-project).
Select your package manager:
Wait for the project structure to be created automatically.
Install dependencies:
bashcd my-project npm install # or yarn, pnpm install, bun install
Start development:
bashnpm run dev # or yarn dev, pnpm dev, bun dev
Access your project:
http://localhost:3000http://localhost:8000Neex provides a powerful CLI with commands tailored for development, building, and production deployment.
neex init: Initializes a new Neex project using create-neex.neex dev [file]: Starts a fast TypeScript development server with live-reloading.neex build [source]: Compiles TypeScript projects for production.neex start [file]: Starts a production-ready application with process management (PM2-like).neex p <commands...> (aliases: par, parallel): Runs commands in parallel.neex s <commands...> (aliases: seq, sequential): Runs commands sequentially.neex dev:clean: Cleans development cache and temporary files.neex dev:check: Validates TypeScript configuration.neex dev:info: Displays development server information.dev Command)The dev command provides a fast, live-reloading development environment.
bash# Start development server for a TypeScript file neex dev src/index.ts # Watch specific directories neex dev --watch src,public "npm run dev" # Ignore patterns neex dev --ignore "*.log,dist/**" "node server.js" # Specify file extensions neex dev --ext ts,tsx,js "npm run dev" # Ultra-fast mode with 50ms delay neex dev --fast "npm run dev"
build Command)Compile TypeScript projects for production.
bash# Build project from src to dist neex build # Build with source maps and watch mode neex build src --sourcemap --watch # Quick compilation neex compile src
start Command)Run production-ready applications with advanced process management.
bash# Start production server neex start dist/server.js # Start with multiple workers neex start dist/server.js --workers 4 # Enable health check endpoint neex start dist/server.js --health-port 3001
dev: Uses neex p to run the frontend (dev:client) and backend (dev:server) development servers in parallel, leveraging Neex's ability to manage concurrent processes with clear output.dev:client: Runs the Next.js frontend development server in the apps/client directory using Bun.dev:server: Runs the Express backend development server in the apps/server directory using Bun.build: Uses neex s to sequentially execute Prisma-related tasks (prisma:generate, prisma:migrate) followed by building both the frontend (build:client) and backend (build:server) projects.build:client: Builds the Next.js frontend in the apps/client directory.build:server: Builds the Express backend in the apps/server directory.start: Uses neex p to start both the frontend (start:client) and backend (start:server) in production mode concurrently, utilizing Neex's advanced process management for clustering and health checks.start:client: Starts the Next.js frontend in production mode.start:server: Starts the Express backend in production mode.prisma:generate: Generates the Prisma client for the backend in apps/server.prisma:migrate: Applies Prisma database migrations in apps/server.bashnpm run dev # Starts frontend and backend development servers in parallel npm run build # Sequentially generates Prisma client, applies migrations, and builds both projects npm run start # Starts frontend and backend in production mode concurrently
Run multiple scripts efficiently.
bash# Parallel execution neex p "npm run build:frontend" "npm run build:backend" # Sequential execution neex s "npm run clean" "npm run build" "npm run deploy" # Parallel with sequential flag neex p -q "npm run step1" "npm run step2"
Neex creates a polyrepo-in-monorepo structure for clear separation and scalability:
my-project/
βββ .env # Root environment variables
βββ apps/
β βββ client/ # Next.js frontend project
β β βββ src/
β β β βββ app/ # Next.js App Router
β β β βββ ...
β β βββ next.config.ts
β β βββ package.json # Frontend dependencies
β β βββ tsconfig.json
β βββ server/ # Express backend project
β βββ src/
β β βββ server.ts # Express server entry
β β βββ ...
β βββ package.json # Backend dependencies
β βββ tsconfig.json
βββ package.json # Root orchestration
βββ README.md
Each apps/client and apps/server directory is a fully independent project that can be extracted into its own repository if needed, while benefiting from a unified monorepo workflow.
neex initbash# Create in current directory npx create-neex@latest . # Create with specific name npx create-neex@latest my-project # Enable debug mode npx create-neex@latest my-project --debug
neex devbash# Custom restart delay neex dev --delay 2000 "npm run dev" # Disable console clearing neex dev --no-clear "node app.js" # Framework-specific example (Nest.js) neex dev --watch src --ext ts "npm run start:dev"
neex buildbash# Custom output directory neex build src --output build # Specify TypeScript target neex build src --target es2022 # Analyze bundle size neex build src --analyze
neex startbash# Custom port neex start dist/server.js --port 8080 # Enable Node.js inspector neex start dist/server.js --inspect # Set memory limit neex start dist/server.js --max-memory 1G
Integrate Neex into your package.json to streamline development, building, and deployment workflows for your fullstack projects. Whether you're working with an Express-only backend or a combined Express + Next.js application, Neexβs powerful CLI and monorepo architecture make it easy to manage your projects efficiently.
For a standalone Express backend, configure your package.json with minimal yet powerful scripts to handle development, building, and production:
json{ "scripts": { "dev": "neex dev src/server.ts", "build": "neex build", "start": "neex start" } }
Run your scripts:
bashnpm run dev # Starts the Express development server with live-reloading npm run build # Compiles TypeScript to production-ready JavaScript npm run start # Launches the Express server in production mode
This setup provides a clean, efficient workflow for Express-based projects, leveraging Neexβs live-reloading and production-ready features for rapid development and deployment.
For a fullstack application with a Next.js frontend and an Express backend, Neexβs polyrepo-in-monorepo architecture shines. The following package.json example demonstrates how to manage both projects concurrently, with integrated Prisma ORM for database operations:
json{ "scripts": { "dev": "neex p dev:client dev:server", "dev:client": "cd apps/client && npm run dev", "dev:server": "cd apps/server && npm run dev", "build": "neex s prisma:generate prisma:migrate build:client build:server", "build:client": "cd apps/client && npm run build", "build:server": "cd apps/server && npm run build", "start": "neex p start:client start:server", "start:client": "cd apps/client && npm run start", "start:server": "cd apps/server && npm run start", "prisma:generate": "cd apps/server && npx prisma generate", "prisma:migrate": "cd apps/server && npx prisma db push" } }
Run your scripts:
bashnpm run dev # Starts Next.js frontend and Express backend in parallel with live-reloading npm run build # Sequentially generates Prisma client, applies migrations, and builds both projects npm run start # Launches frontend and backend in production mode concurrently
neex p to run frontend and backend tasks simultaneously, ensuring efficient development and production workflows.neex s for tasks like Prisma migrations and builds, ensuring dependencies are handled in the correct order.prisma:generate and prisma:migrate for type-safe, rapid development.This configuration is perfect for developers building fullstack applications with Next.js, Express, and Prisma, offering a seamless, scalable, and maintainable development experience. Start using Neex today to simplify your workflow and build high-performance applications with ease!
Contributions are welcome! Visit our GitHub issues page to get started.
Comments
Sign in to leave a comment or like this post