{"id":19900340,"url":"https://github.com/muslehud77/basic-server-template-node","last_synced_at":"2026-04-08T11:33:08.412Z","repository":{"id":240919545,"uuid":"803786701","full_name":"Muslehud77/Basic-Server-Template-Node","owner":"Muslehud77","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-21T11:44:05.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T12:17:26.056Z","etag":null,"topics":["dotenv","eslint","expressjs","husky","mongoose","nodejs","prettier","typescript","zod"],"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/Muslehud77.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}},"created_at":"2024-05-21T11:40:50.000Z","updated_at":"2024-05-21T11:45:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"bef17569-2436-4450-8251-38593675e07d","html_url":"https://github.com/Muslehud77/Basic-Server-Template-Node","commit_stats":null,"previous_names":["muslehud77/basic-server-template-node"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Muslehud77/Basic-Server-Template-Node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muslehud77%2FBasic-Server-Template-Node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muslehud77%2FBasic-Server-Template-Node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muslehud77%2FBasic-Server-Template-Node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muslehud77%2FBasic-Server-Template-Node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Muslehud77","download_url":"https://codeload.github.com/Muslehud77/Basic-Server-Template-Node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muslehud77%2FBasic-Server-Template-Node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31554093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["dotenv","eslint","expressjs","husky","mongoose","nodejs","prettier","typescript","zod"],"created_at":"2024-11-12T20:11:59.603Z","updated_at":"2026-04-08T11:33:08.359Z","avatar_url":"https://github.com/Muslehud77.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Basic Setup\n\nThis project is a basic server setup using Node.js, Express, TypeScript, and Mongoose. It provides a starting point for developing a server-side application with a structured and maintainable codebase.\n\n## Table of Contents\n\n- [Technologies Used](#technologies-used)\n- [Project Structure](#project-structure)\n- [Setup Instructions](#setup-instructions)\n- [Scripts](#scripts)\n- [Environment Variables](#environment-variables)\n\n## Technologies Used\n\n- **Node.js**: A JavaScript runtime built on Chrome's V8 JavaScript engine.\n- **Express**: A fast, unopinionated, minimalist web framework for Node.js.\n- **TypeScript**: A strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.\n- **Mongoose**: A MongoDB object modeling tool designed to work in an asynchronous environment.\n- **Zod**: A TypeScript-first schema declaration and validation library.\n- **dotenv**: A module that loads environment variables from a `.env` file into `process.env`.\n- **ts-node-dev**: A development tool that compiles TypeScript files on the fly and restarts the server upon file changes.\n- **ESLint**: A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.\n- **Prettier**: An opinionated code formatter.\n- **Husky**: A tool for managing Git hooks.\n\n## Project Structure\n\n```\nBasic_Setup/\n├── src/\n│   ├── server.ts\n│   └── ...\n├── dist/\n│   └── server.js\n├── .env\n├── package.json\n└── README.md\n```\n\n## Setup Instructions\n\n1. **Clone the Repository**\n\n   ```sh\n   git clone https://github.com/Muslehud77/Basic-Server-Template-Node.git\n   cd Basic_Setup\n   ```\n\n2. **Install Dependencies**\n\n   Make sure you have Node.js and npm installed. Then run:\n\n   ```sh\n   npm install\n   ```\n\n3. **Setup Environment Variables**\n\n   Create a `.env` file in the root directory and add the following variables:\n\n   ```plaintext\n   PORT=your_port_number\n   DB_URI=your_mongodb_connection_string\n   ```\n\n   Replace `your_port_number` with the port number you want the server to run on (e.g., 6000) and `your_mongodb_connection_string` with your actual MongoDB connection string.\n\n4. **Build the Project**\n\n   Compile the TypeScript code to JavaScript:\n\n   ```sh\n   npm run build\n   ```\n\n5. **Start the Server**\n\n   - For development:\n\n     ```sh\n     npm run start:dev\n     ```\n\n   - For production:\n\n     ```sh\n     npm run start:prod\n     ```\n\n## Scripts\n\n- **`build`**: Compiles TypeScript files to JavaScript.\n- **`lint`**: Runs ESLint to analyze the code for potential errors and code style issues.\n- **`lint:fix`**: Automatically fixes linting issues.\n- **`prettier`**: Formats the code using Prettier.\n- **`prettier:fix`**: Automatically formats the code using Prettier.\n- **`start:dev`**: Starts the server in development mode with auto-reloading.\n- **`start:prod`**: Starts the server in production mode.\n- **`test`**: Placeholder for running tests.\n\n## Environment Variables\n\nThe following environment variables are used in the project:\n\n- **`PORT`**: The port on which the server will run.\n- **`DB_URI`**: The MongoDB connection string.\n\nMake sure to replace the placeholder values in the `.env` file with your own configurations.\n\n## Conclusion\n\nThis basic setup provides a structured starting point for developing a Node.js server application with TypeScript, Express, and Mongoose. Feel free to modify and extend the project to suit your needs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuslehud77%2Fbasic-server-template-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuslehud77%2Fbasic-server-template-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuslehud77%2Fbasic-server-template-node/lists"}