cidc-node-app
v1.0.1-beta.1
Published
cidc-node-app cidc-node-app is a CLI tool for scaffolding a Node.js application with customizable features. This tool allows you to quickly set up a new Node.js project using TypeScript with options for ESLint, Prettier, authentication providers (AWS Cog
Downloads
38
Maintainers
Readme
cidc-node-app cidc-node-app is a CLI tool for scaffolding a Node.js application with customizable features. This tool allows you to quickly set up a new Node.js project using TypeScript with options for ESLint, Prettier, authentication providers (AWS Cognito or Azure B2C), and database setup (MongoDB or PostgreSQL).
Features Project Scaffolding: Set up a new Node.js project with a predefined TypeScript template. Linting: Optionally include ESLint for code quality and style enforcement. Formatting: Optionally include Prettier for code formatting. Authentication: Choose between AWS Cognito and Azure B2C for authentication. Database Setup: Configure your project to use either MongoDB or PostgreSQL. Installation To use cidc-node-app, you need to have Node.js and npm installed. You can then install the CLI tool globally via npm:
bash Copy code npm install -g cidc-node-app Usage Create a New Project To create a new Node.js typescript project, run:
bash Copy code create-node-app Replace with the desired name for your project.
Follow the Prompts The CLI tool will prompt you to select various options:
Project Name: Enter the name of your new project. Linting: Choose whether to include ESLint. Prettier: Choose whether to include Prettier. Authentication Provider: Select between AWS Cognito and Azure B2C. Based on your choices, the tool will:
Copy necessary files and folders from the template. Install dependencies as specified in your package.json. Configure ESLint and Prettier if selected. Set up authentication files based on the chosen provider. Configure the index.ts file to select the database according to your choice. Authentication Configuration The cidc-node-app tool supports two authentication providers:
AWS Cognito Azure B2C The relevant authentication middleware files will be copied based on your choice. Ensure to review and configure these files as needed.
Database Setup In the index.ts file, you can find the selectDatabase function. This function allows you to choose between MongoDB and PostgreSQL. Modify this function to set up the desired database according to your project requirements.
Example Here is an example of how to create a new project with ESLint, Prettier, and AWS Cognito authentication:
bash Copy code create-node-app my-node-app Enter my-node-app as the project name. Choose yes for ESLint. Choose yes for Prettier. Choose AWS Cognito for authentication. Contributing Feel free to submit issues or pull requests to enhance the tool. Contributions are welcome!
License This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to adjust any specifics or add additional sections as needed!