Skip to content

codehassoul/setup-node-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version npm downloads license

🚀 setup-node-api

Scaffold a production-ready Node.js + Express API in seconds — with interactive setup and zero configuration.

🔗 GitHub: https://github.com/codehassoul/setup-node-api


✨ Features

  • Instant project setup with zero configuration
  • 🤖 Interactive mode for beginners (guided prompts)
  • 🧠 Smart CLI behavior (flags + prompts hybrid)
  • 🛡️ Safe overwrite handling with confirmation
  • 🎨 Clean CLI output (colors + spinner)
  • 🔧 Configurable via flags
  • 📦 Works directly with npx (no install required)

📦 Quick Start

npx setup-node-api my-app

🎬 Demo

npx setup-node-api

🧠 Interactive Mode

Run without arguments:

npx setup-node-api

You’ll be guided through:

  • Project name
  • TypeScript or JavaScript
  • Install dependencies

▶️ Usage

setup-node-api <project-name>

⚙️ Options

Skip installing dependencies

setup-node-api my-app --no-install

Use TypeScript template

setup-node-api my-app --typescript

Set custom port

setup-node-api my-app --port 5000

🧪 Examples

Full interactive

npx setup-node-api

With flags (no prompts)

npx setup-node-api my-api --typescript --no-install

Custom port

npx setup-node-api my-api --port 4000

🛡️ Safety

If the target folder already exists, the CLI will ask before overwriting:

? Folder already exists. Overwrite? (y/N)

✨ What happens after setup?

✨ Project ready!

📁 Location:
   ./my-app

👉 Next steps:
   cd my-app
   npm start

📁 Generated Project

Each project includes:

  • Express server setup
  • /health endpoint
  • .env support
  • Ready-to-run scripts

📁 Example Structure

my-app/
  ├── src/
  │   └── app.js / app.ts
  ├── package.json
  ├── .env

🛠️ Tech Stack

  • Node.js
  • Express
  • Commander
  • Inquirer
  • Chalk
  • Ora

🎯 Why This Tool?

Most scaffolding tools are either:

  • too complex
  • or too minimal

setup-node-api focuses on:

simplicity + great developer experience


📄 License

MIT © 2026 codehassoul

About

CLI tool to scaffold Node.js + Express APIs with interactive setup

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors