0.1.0 • Published 1 year ago
generate-expressjs v0.1.0
Generate ExpressJS
Generate ExpressJS is a CLI app that creates an ExpressJS boilerplate project. This tool helps you quickly set up a new ExpressJS application with a predefined structure and necessary configurations.
Features
- Creates a new project directory with the specified name.
- Initializes a new Node.js project with
npm init. - Installs ExpressJS and Nodemon.
- Sets up a basic ExpressJS server in
src/app.jsorsrc/app.tsif TypeScript support is enabled. - Configures start and development scripts in
package.json. - Adds a
.gitignorefile with common Node.js, ES6 module, and project-specific ignores. - Optionally adds TypeScript support with a
tsconfig.jsonfile. - Adds
dotenvsupport and creates a.envfile with default configurations.
Installation
You can use npx to run the CLI without installing it globally:
npx generate-expressjsUsage
Run the CLI and follow the prompts to create your ExpressJS project:
npx generate-expressjsYou will be asked to provide a name for your app and whether you want to add TypeScript support.
Running the Project
Navigate to your project directory and start the development server:
cd your-app-name
npm run devIf you added TypeScript support, the TypeScript files will be compiled before starting the server.