{"id":32709111,"url":"https://github.com/coderboy-raiyan/minimal-node-ts-server-starter","last_synced_at":"2026-05-08T07:34:39.344Z","repository":{"id":320880984,"uuid":"1083643965","full_name":"coderboy-raiyan/minimal-node-ts-server-starter","owner":"coderboy-raiyan","description":"A tiny, minimal starter for a Node + Express app written in TypeScript and intended to run with Bun.","archived":false,"fork":false,"pushed_at":"2025-11-28T06:47:27.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-30T16:47:35.529Z","etag":null,"topics":["biomejs","bun","express","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderboy-raiyan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-26T12:55:04.000Z","updated_at":"2025-11-28T06:47:30.000Z","dependencies_parsed_at":"2025-10-26T15:22:38.495Z","dependency_job_id":null,"html_url":"https://github.com/coderboy-raiyan/minimal-node-ts-server-starter","commit_stats":null,"previous_names":["coderboy-raiyan/minimal-node-ts-server-starter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coderboy-raiyan/minimal-node-ts-server-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderboy-raiyan%2Fminimal-node-ts-server-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderboy-raiyan%2Fminimal-node-ts-server-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderboy-raiyan%2Fminimal-node-ts-server-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderboy-raiyan%2Fminimal-node-ts-server-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderboy-raiyan","download_url":"https://codeload.github.com/coderboy-raiyan/minimal-node-ts-server-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderboy-raiyan%2Fminimal-node-ts-server-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32771099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biomejs","bun","express","nodejs","typescript"],"created_at":"2025-11-02T04:00:50.526Z","updated_at":"2026-05-08T07:34:39.333Z","avatar_url":"https://github.com/coderboy-raiyan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node + TS + Express + Bun - Starter\n\nThis file provides guidance to WARP (warp.dev) when working with code in this repository.\n\n## Project Overview\n\nA minimal Node.js + Express server written in TypeScript, designed to run with Bun runtime. Uses MongoDB (via Mongoose) for data persistence.\n\n## Runtime \u0026 Package Manager\n\nThis project uses **Bun** as both the runtime and package manager (not npm/yarn/pnpm).\n\n- Install dependencies: `bun install`\n- All scripts run via `bun run \u003cscript\u003e`\n\n## Development Commands\n\n### Running the Server\n```bash\nbun run dev          # Development mode with hot-reload (watches src/server.ts)\nbun run build        # Build for production (outputs to ./dist)\nbun run start        # Run production build (requires Node.js)\n```\n\n### Code Quality\n```bash\nbun run lint         # Run ESLint\nbun run lint:fix     # Auto-fix ESLint issues\nbun run format       # Format all TypeScript files with Prettier\nbun run format:check # Check Prettier formatting without changes\nbun run typecheck    # Type-check without emitting files\n```\n\n## Architecture\n\n### Entry Points\n- **`src/server.ts`**: Application bootstrap - connects to MongoDB and starts HTTP server\n- **`src/app.ts`**: Express application configuration with middleware setup\n- **`src/config/index.ts`**: Environment configuration loader (from `.env`)\n\n### Application Flow\n1. `server.ts` imports the Express app from `app.ts`\n2. Establishes MongoDB connection via Mongoose\n3. Creates HTTP server and listens on configured PORT\n4. Express app has CORS enabled with `origin: '*'` and credentials support\n\n### Project Structure\n```\nsrc/\n├── server.ts          # Bootstrap \u0026 database connection\n├── app.ts             # Express app \u0026 middleware\n└── config/\n    └── index.ts       # Environment variables\n```\n\n### Middleware Stack (in order)\n1. `express.json()` - Body parsing\n2. `cookie-parser` - Cookie parsing\n3. `cors` - CORS with credentials enabled\n\n### Environment Variables\nRequired in `.env`:\n- `PORT` - Server port (default: 5000)\n- `NODE_ENV` - Environment (e.g., \"development\")\n- `DB_URI` - MongoDB connection string\n\n## Code Style\n\n### ESLint Rules\n- Unused variables error (except those prefixed with `_`)\n- `no-explicit-any` is a warning, not an error\n- `prefer-const` enforced\n- `no-console` is a warning (use sparingly)\n\n### Prettier Configuration\n- Single quotes\n- Semicolons required\n- Tab width: 4 spaces\n- Print width: 100 characters\n- Arrow function parens: avoid when possible\n- Trailing commas: ES5 style\n\n## Technical Details\n\n### TypeScript Configuration\n- Target: ES2022\n- Module: ESNext with bundler resolution\n- Strict mode enabled\n- Types: bun-types, node\n\n### Dependencies\n- **Express 5.x** (note: v5, not v4)\n- **Mongoose 8.x** for MongoDB ODM\n- Cookie parser and CORS middleware included\n\n## Development Notes\n\n- The project currently has a minimal structure with only the core setup files\n- No routes, controllers, models, or services layers exist yet\n- When adding new features, follow Express best practices for organizing routes and middleware\n- MongoDB connection uses `mongoose.connect()` - ensure MongoDB is running locally or adjust DB_URI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderboy-raiyan%2Fminimal-node-ts-server-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderboy-raiyan%2Fminimal-node-ts-server-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderboy-raiyan%2Fminimal-node-ts-server-starter/lists"}