{"id":22680182,"url":"https://github.com/coderooz/my_server_project","last_synced_at":"2025-09-14T20:19:32.359Z","repository":{"id":247358637,"uuid":"825631872","full_name":"coderooz/my_server_project","owner":"coderooz","description":"A Python-based web server using Flask, enabling custom domain support and static file serving. Easily configurable via config.py, it allows port-free access by running on port 5000. Ideal for local development mimicking real-world deployment.","archived":false,"fork":false,"pushed_at":"2024-07-08T08:12:28.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T13:51:43.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderooz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-07-08T08:01:24.000Z","updated_at":"2024-11-18T05:13:18.000Z","dependencies_parsed_at":"2024-07-08T10:15:52.741Z","dependency_job_id":"2faf4fb0-eafc-4b38-9a82-a4a7b8504cf7","html_url":"https://github.com/coderooz/my_server_project","commit_stats":null,"previous_names":["coderooz/my_server_project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coderooz/my_server_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fmy_server_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fmy_server_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fmy_server_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fmy_server_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderooz","download_url":"https://codeload.github.com/coderooz/my_server_project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fmy_server_project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275160615,"owners_count":25415813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-09T19:12:39.077Z","updated_at":"2025-09-14T20:19:32.310Z","avatar_url":"https://github.com/coderooz.png","language":"Python","readme":"\r\n# My Server Project\r\n\r\n## Overview\r\n\r\nMy Server Project is a Python-based web server that allows you to host an HTML website with a customizable domain name. This project is built using Flask, a lightweight WSGI web application framework, to serve static files and make your local development environment mimic a real-world scenario where you can access your site using a custom domain without specifying a port number.\r\n\r\n## Features\r\n\r\n- **Custom Domain Support:** Easily configure and access your website using a custom domain name.\r\n- **Static File Serving:** Serve HTML, CSS, JavaScript, and other static files from a predefined directory.\r\n- **Port-Free Access:** Optionally configure the server to run on port 5000, allowing you to access your site without specifying a port number in the URL.\r\n- **Easy Configuration:** Simple and flexible configuration through a single `config.py` file.\r\n- **Local Development Mimicking Real-World Deployment:** Test and develop your website locally as if it were hosted on a real web server with a custom domain.\r\n\r\n## Getting Started\r\n\r\n### Prerequisites\r\n\r\n- Python 3.x\r\n- Flask\r\n\r\n### Installation\r\n\r\n1. **Clone the repository:**\r\n   ```sh\r\n   git clone https://github.com/coderooz/my_server_project.git\r\n   cd my_server_project\r\n   ```\r\n\r\n2. **Create a virtual environment:**\r\n   ```sh\r\n   python3 -m venv venv\r\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\r\n   ```\r\n\r\n3. **Install Flask:**\r\n   ```sh\r\n   pip install flask\r\n   ```\r\n\r\n### Configuration\r\n\r\n1. **Edit the configuration file:**\r\n\r\n   Open `config.py` and set your custom domain and static files directory:\r\n   ```python\r\n   class Config:\r\n       SERVER_NAME = \"www.myserverproject.proj:5000\"\r\n       STATIC_FOLDER = \"static_files\"\r\n   ```\r\n\r\n2. **Update your hosts file:**\r\n\r\n   Add the following line to your hosts file to map your custom domain to `127.0.0.1`:\r\n\r\n   - **Windows:**\r\n     ```sh\r\n     127.0.0.1   www.myserverproject.proj\r\n     ```\r\n     (Located at `C:\\Windows\\System32\\drivers\\etc\\hosts`)\r\n\r\n   - **Mac/Linux:**\r\n     ```sh\r\n     sudo nano /etc/hosts\r\n     ```\r\n     Add:\r\n     ```sh\r\n     127.0.0.1   www.myserverproject.proj\r\n     ```\r\n\r\n### Running the Server\r\n\r\n1. **Run the Flask application:**\r\n   ```sh\r\n   sudo python run.py  # Use sudo only if running on port 5000\r\n   ```\r\n\r\n2. **Access your website:**\r\n\r\n   Open your browser and go to `http://www.myserverproject.proj`. You should see your website without specifying a port number.\r\n\r\n### Changing the Custom Domain or Static Files Directory\r\n\r\nTo change the custom domain or the static files directory, simply update the `config.py` file:\r\n```python\r\nclass Config:\r\n    SERVER_NAME = \"newdomain.proj:5000\"\r\n    STATIC_FOLDER = \"new_static_folder\"\r\n```\r\n\r\nMake sure to update your hosts file accordingly if you change the domain name.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Contributing\r\n\r\nFeel free to fork this repository, create a feature branch, and submit a pull request. All contributions are welcome!\r\n\r\n## Contact\r\n\r\nFor any questions or suggestions, please contact [viewersweb02gmial.com].\r\n\r\n---\r\n\r\n**This description covers the key features, installation steps, configuration, and usage instructions to help users get started with your project.**\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderooz%2Fmy_server_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderooz%2Fmy_server_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderooz%2Fmy_server_project/lists"}