Skip to content

captainulfur/create-server-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

create-server-nodejs

A fast and modern CLI tool to scaffold ready-to-use Node.js Express backend projects.

Generate a clean, professional Express server with support for MongoDB and PostgreSQL in seconds.


✨ Features

  • ⚡ Extremely fast project generation
  • 📁 Clean and scalable folder structure
  • 🗄️ MongoDB + Mongoose (default)
  • 🐘 PostgreSQL + Prisma support
  • 🔐 JWT authentication middleware included
  • 📦 Automatic npm install
  • 🌐 Install in current directory with .
  • ✨ Full ES Modules support ("type": "module")
  • 🚀 Ready for production

Quick Start

Create a new project (MongoDB - Default)

npx create-server-nodejs my-app

Create with PostgreSQL

npx create-server-nodejs my-app --postgresql

Install in current directory

npx create-server-nodejs .

Project Structure

my-app/
├── Controllers/          # Controllers and business logic
├── Models/               # Database models
├── Routers/              # API routes
├── Middlewares/          # Authentication, validation, error handling
├── Utils/                # Helper functions
├── config/               # Configuration files
├── prisma/               # Prisma schema (only when using PostgreSQL)
├── server.js
├── app.js
├── .env.example
├── package.json
└── README.md

How to Run

cd my-app

# Copy environment variables
cp .env.example .env

# For PostgreSQL only:
# npx prisma generate
# npx prisma db push

# Run development server
npm run dev

Available Options

Command Description
npx create-server-nodejs <name> Create a new project
npx create-server-nodejs . Scaffold in current directory
--mongodb Use MongoDB + Mongoose (default)
--postgresql Use PostgreSQL + Prisma

Tech Stack

  • Express.js
  • MongoDB + Mongoose or PostgreSQL + Prisma
  • JWT Authentication
  • bcryptjs, cors, morgan, dotenv
  • Nodemon (dev dependency)

License

This project is licensed under the MIT License.

Made with ❤️ for faster backend development Happy coding!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors