A small interactive CLI to scaffold a Node.js + TypeScript backend project with optional dist/
, nodemon
, and hover-explainer [RECOMMENDED] support.
- TypeScript + ts-node support
- Optional
dist/
folder for compiled JS - Nodemon-based dev server
- Generates
tsconfig.json
,.gitignore
, and optional.fileDescriptions.json
for hover support - CLI-driven setup using
prompts
- Node.js >= 14
ts-node
(installed automatically)
- Clone or copy this script.
- Run:
npx create-node-with-ts
- Answer the prompts:
Root folder name
Main entry file
Use dist/ for compiled output?
Enable nodemon?
Enable hover-explainer support?
npm run build # Build the project
npm start # Run it
npm run dev # If nodemon enabled
4.Folder Structure
my-app/
├── src/
│ └── index.ts
├── dist/ # optional
├── package.json
├── tsconfig.json
├── .gitignore
├── nodemon.json # optional
└── .fileDescriptions.json # optional
License
---
Let me know if you want me to:
- convert the script into a CLI with `commander` or `yargs`
- generate `.d.ts` support
- publish it as an npm CLI (`npx create-node-ts`)
- add unit tests or linting configs