Skip to content
Visalan-HPublic

About

npx vizz-init scaffolds an Express + TypeScript backend with folder structure, middleware and lint config.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

vizz-init

npm

Generate Express.js projects with folder structure and starter code.

Installation

You can use this package without installing it globally by using npx:

npx vizz-init [project-name]

Usage

Basic Usage

Create a new backend project in the current directory:

npx vizz-init

This will create a backend folder with the Express.js boilerplate.

Custom Project Name

Specify a custom project directory name:

npx vizz-init my-api-project

What it creates

When you run npx vizz-init, it will:

  1. Create a new directory (default: backend or your specified name)
  2. Initialize npm with npm init -y
  3. Install dependencies: Express.js and dotenv
  4. Generate a basic server.js file with:
    • Express app setup
    • JSON middleware
    • Environment variable configuration
    • Dynamic PORT from .env file
    • Basic "Hello, world!" route
  5. Create environment files:
    • .env file with PORT=3000
    • .gitignore with Node.js exclusions
  6. Create project structure with folders:
    • models/ - for database models
    • controllers/ - for route controllers
    • routes/ - for route definitions
    • middleware/ - for custom middleware
  7. Update package.json with useful scripts:
    • npm start - runs the server with node
    • npm run dev - runs the server with nodemon for development

Generated Project Structure

your-project/
├── package.json
├── server.js
├── controllers/
├── middleware/
├── models/
└── routes/

Getting Started with Generated Project

After running vizz-init, navigate to your project and start development:

cd backend  # or your custom project name
npm run dev

Your server will be running at http://localhost:3000

Requirements

  • Node.js (version 12 or higher)
  • npm

License

MIT

Author

Visalan H

Contributing

Feel free to submit issues and enhancement requests!


*P.S. - This tool exists because I got tired of typing mkdir over and over again.

About

npx vizz-init scaffolds an Express + TypeScript backend with folder structure, middleware and lint config.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages