1.0.5 β€’ Published 4 months ago

sobal-express-setup-tool v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Sobal Express Setup Tool

Sobal Express Setup Tool is a command-line tool designed to scaffold Express.js projects with an optional Socket.IO setup. It creates a predefined folder structure, allowing developers to quickly get started with their projects.

Features

  • Scaffolds a project structure for Express.js applications.
  • Offers optional integration with Socket.IO.
  • Customizable server setup based on user input.
  • Easy installation and setup with npx.

Installation

To get started with the Sobal Express Setup Tool, you can use npx to run it directly without installing it globally:

npx sobal-express-setup-tool

Usage

When you run the package, you will be prompted to choose whether to include Socket.IO in your setup. Based on your choice, the tool will generate the appropriate project files.

Options

During the setup process, the tool will prompt you with the following question:

Do you want to include Socket.IO?

  • Yes: This will include the config/, middleware/ socket/, utils/ and validator/ folders in root and configure the server with Socket.IO support.
  • No: This will include these folders within the api/ directory and configure the server without Socket.IO support.

Project Structure

The generated project will have the following structure:

With Socket.IO

πŸ“root
β”œβ”€β”€ πŸ“api
β”‚   β”œβ”€β”€ πŸ“controller
β”‚   β”‚   └── user.js
β”‚   β”œβ”€β”€ πŸ“models
β”‚   β”‚   └── user.js
β”‚   └── πŸ“router
β”‚       └── user.js
β”œβ”€β”€ πŸ“config
β”‚   β”œβ”€β”€ πŸ“db
β”‚   β”‚   └── mongoDb.js
β”‚   └── corsOptions.js
β”œβ”€β”€ πŸ“middleware
β”‚   β”œβ”€β”€ πŸ“express
β”‚   β”‚   β”œβ”€β”€ loginCheck.js
β”‚   β”‚   └── validateRequest.js
β”‚   └── πŸ“socket
β”‚       └── loginCheck.js
β”œβ”€β”€ πŸ“socket
β”‚   β”œβ”€β”€ πŸ“services
β”‚   β”‚   └── socketServices.js
β”‚   └── socketServer.js
β”œβ”€β”€ πŸ“utils
β”‚   β”œβ”€β”€ jwtTokenUtils.js
β”‚   └── passwordsUtils.js
β”œβ”€β”€ πŸ“validator
β”‚   └── user.js
β”œβ”€β”€ .env
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ packagesList.txt
└── server.js

Without Socket.IO

πŸ“root
β”œβ”€β”€ πŸ“api
β”‚   β”œβ”€β”€ πŸ“config
β”‚   β”‚   β”œβ”€β”€ πŸ“db
β”‚   β”‚   β”‚   └── mongoDb.js
β”‚   β”‚   └── corsOptions.js
β”‚   β”œβ”€β”€ πŸ“controller
β”‚   β”‚   └── user.js
β”‚   β”œβ”€β”€ πŸ“middleware
β”‚   β”‚   β”œβ”€β”€ validateRequest.js
β”‚   β”‚   └── verifyToken.js
β”‚   β”œβ”€β”€ πŸ“models
β”‚   β”‚   └── user.js
β”‚   β”œβ”€β”€ πŸ“router
β”‚   β”‚   └── user.js
β”‚   β”œβ”€β”€ πŸ“utils
β”‚   β”‚   β”œβ”€β”€ jwtTokenUtils.js
β”‚   β”‚   └── passwordsUtils.js
β”‚   └── πŸ“validator
β”‚       └── user.js
β”œβ”€β”€ .env
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ packagesList.txt
└── server.js

Contributing

If you would like to contribute to this project, follow these steps:

  • Fork the repository.
  • Create a new branch (git checkout -b feature/your-feature).
  • Make your changes and commit them (git commit -am 'Add new feature').
  • Push your branch to the remote repository (git push origin feature/your-feature).
  • Open a Pull Request.

License

This project is licensed under the MIT License.

1.0.5

4 months ago

1.0.4

4 months ago

1.0.2

4 months ago

1.0.1

11 months ago

1.0.0

11 months ago