This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

ez-app-builder

2.3.6 • Public • Published

ez-app-builder

npm version npm download License


ez-app-builder is a Node.js package designed to streamline the process of setting up full-stack applications. It automates the creation of directory structures and offers an interactive interface to install essential npm packages. With ez-app-builder, developers can quickly initialize their projects, saving time and effort in the setup phase.

## Features

- **Automated Directory Structure**: Quickly set up backend and frontend directories with a simple command.
- **Interactive Package Installation**: Choose from a list of essential npm packages to install for your project.
- **Supports Full-Stack Applications**: Build both backend and frontend parts of your application effortlessly.
- **Saves Time and Effort**: Eliminate the manual setup process and get started with your project right away.

## Installation

You can install `ez-app-builder globally` using npm:

```bash
`npm install -g ez-app-builder`
```

Usage

Once installed, you can use ez-app-builder commands to create your projects:

  • To build your project: build
  • To build the backend: build-backend
  • To build the frontend: build-frontend

Follow the prompts to customize your project setup and package installations.

How to Use

Creating a Full-Stack Project

To create a full-stack project, follow these steps:

  1. Run build in your terminal.
  2. Enter a name for your project and choose the packages you want to install.
  3. The script will create backend and frontend directories with the specified name and install the chosen packages in each directory.
  4. You can then customize the backend and frontend as needed for your project.

Creating Backend Only

To create a backend-only project, follow these steps:

  1. Run build-backend in your terminal.
  2. Enter a name for your backend directory and choose the packages you want to install.
  3. The script will create a backend directory with the specified name and install the chosen packages.
  4. You can then customize the backend for your project.

Creating Frontend Only

To create a frontend-only project, follow these steps:

  1. Run build-frontend in your terminal.
  2. Enter a name for your frontend directory and choose the packages you want to install.
  3. The script will create a frontend directory with the specified name and install the chosen packages.
  4. You can then customize the frontend for your project.

Customization

  • Project Name: You can customize the name of your project by entering a different name when prompted.
  • Packages: Choose the npm packages you want to install for your project. Select from the list of available packages or enter custom package names.

Setup for MongoDB Configuration

To set up a MongoDB configuration and connect to a MongoDB database in your backend project, follow these steps:

  1. Ensure that mongoose is included as part of your project dependencies. If not, you can install it using npm install mongoose in your backend directory.

  2. Update your main backend file (e.g., index.js or server.js) to import and call the connectDB function:

import express from "express";
import mongoose from "mongoose";

const app = express();

// MongoDB connection
mongoose
  .connect(process.env.MONGODB_URI || "mongodb://localhost:27017/mydatabase")
  .then(() => console.log("MongoDB connected"))
  .catch((err) => console.error("MongoDB connection error:", err));

const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
  console.log(`Server is running on port ${PORT}`);
});

Setup for Main File in Backend

The main file in the backend directory is typically named index.js or server.js. You can customize this file to set up your backend server using Express, Koa, or any other framework of your choice. Here's an example of setting up a basic Express server in index.js:

import express from "express";

const app = express();

app.get("/", (req, res) => {
  res.send("Hello, world!");
});

const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
  console.log(`Server is running on port ${PORT}`);
});

You can further customize this file to add routes, middleware, database connections, etc., based on your project requirements.

Package Sidebar

Install

npm i ez-app-builder

Weekly Downloads

17

Version

2.3.6

License

MIT

Unpacked Size

29.5 kB

Total Files

6

Last publish

Collaborators

  • ayushdumasia