Add package.json with build/start/dev/test scripts, tsconfig.json with strict mode and CommonJS target, .gitignore, and CLAUDE.md documenting the new project structure and commands. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
word-counter-api
Project Status
Node.js/TypeScript project initialized with npm and tsconfig. Source code implementation is pending.
Build Commands
npm install # install dependencies
npm run build # compile TypeScript → dist/ via tsc
Test Commands
npm test # run full Jest test suite
npm test -- path/to/file.test.ts # run a single test file
npm test -- -t "test name" # run a single named test
Development Commands
npm run dev # tsx watch src/server.ts (TypeScript watch mode)
npm start # node dist/server.js (production build)
Project Structure
word-counter-api/
├── src/ # TypeScript source files (to be added)
│ └── server.ts # Entry point
├── dist/ # Compiled JavaScript output (gitignored)
├── package.json # npm manifest with build/start/dev/test scripts
├── tsconfig.json # TypeScript config (CommonJS, strict mode)
├── .gitignore
├── README.md
└── CLAUDE.md # This file
Architecture Notes
- Purpose: An API service for counting words in text input.
- Stack: Node.js + TypeScript (CommonJS modules,
tscbuild,tsxfor dev watch). - Key design decisions still to make: HTTP framework, authentication strategy, request/response format (REST vs. GraphQL), deployment target.
Code Style
TypeScript strict mode is enabled ("strict": true in tsconfig.json). No linter or formatter configured yet. Document here once a stack is chosen (e.g., ESLint/Prettier).