{"id":21124499,"url":"https://github.com/zauberware/weblogger","last_synced_at":"2026-04-24T08:31:42.165Z","repository":{"id":239932530,"uuid":"800975464","full_name":"zauberware/weblogger","owner":"zauberware","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-20T22:08:33.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-01T04:19:57.243Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zauberware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-15T11:06:31.000Z","updated_at":"2024-05-20T22:08:35.000Z","dependencies_parsed_at":"2024-05-16T02:29:22.057Z","dependency_job_id":"085891eb-2003-460b-b5a0-034aa85d6dd3","html_url":"https://github.com/zauberware/weblogger","commit_stats":null,"previous_names":["zauberware/weblogger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zauberware/weblogger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zauberware%2Fweblogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zauberware%2Fweblogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zauberware%2Fweblogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zauberware%2Fweblogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zauberware","download_url":"https://codeload.github.com/zauberware/weblogger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zauberware%2Fweblogger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32216149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T08:24:32.376Z","status":"ssl_error","status_checked_at":"2026-04-24T08:24:26.731Z","response_time":64,"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":[],"created_at":"2024-11-20T04:16:45.250Z","updated_at":"2026-04-24T08:31:42.144Z","avatar_url":"https://github.com/zauberware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weblogger\n\nThis is a Node.js application that uses Express.js for the server, WebSocket for real-time communication, and EJS for rendering HTML. The main purpose of this application is to make log files accessible over HTTP.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\n- Node.js\n- yarn or npm\n\n### Installing\n\n1. Clone the repository\n\n   ```bash\n   git clone git@github.com:zauberware/weblogger.git\n   ```\n\n2. Navigate into the cloned repository\n\n   ```bash\n   cd weblogger\n   ```\n\n3. Install the dependencies\n\n   ```bash\n   yarn install\n   ```\n\n4. Start the server\n   ```bash\n   yarn start # or yarn dev to start with nodemon\n   ```\n\nThe server will start on port 3000, or on the port specified in your environment variables.\n\n## Usage\n\nThe application serves static files from the `public` directory. You can access these files by navigating to `http://localhost:3000/\u003cfilename\u003e`.\n\nThe main feature of this application is the ability to view log files over HTTP. The application reads from two log files: `access.log` and `error.log`. These file paths can be configured using the `INFO_LOG` and `ERROR_LOG` environment variables, respectively.\n\n**Note:** The server requires read and write permissions on the `error.log` and `access.log` files.\n\n## Production\n\nFor production environments, we recommend using [PM2](https://pm2.keymetrics.io/), a production process manager for Node.js applications.\n\n### Installing PM2\n\nYou can install PM2 globally on your system by running the following command:\n\n```\nnpm install pm2 -g\n```\n\n### Running the Application with PM2\n\nOnce PM2 is installed, you can start your application with the following command:\n\n```\npm2 start app.js\n```\n\nReplace `app.js` with the entry point to your application if it's different.\n\n### Other Useful PM2 Commands\n\n- To view the status of your applications:\n\n  ```\n  pm2 status\n  ```\n\n- To restart an application:\n\n  ```\n  pm2 restart app_name_or_id\n  ```\n\n- To stop an application:\n\n  ```\n  pm2 stop app_name_or_id\n  ```\n\n- To view detailed metrics and logs for your application:\n\n  ```\n  pm2 monit\n  ```\n\nRemember to replace `app_name_or_id` with the name or id of your application as listed in `pm2 status`.\n\nFor more information on how to use PM2, refer to the [official PM2 documentation](https://pm2.keymetrics.io/docs/usage/quick-start/).\n\n## Nginx Reverse Proxy Configuration\n\nFor production environments, we recommend using Nginx as a reverse proxy for your application. Here's a basic configuration that you can use:\n\n```\nserver {\n    listen 80;\n    server_name logs.yourdomain.com;\n\n    location / {\n        proxy_pass http://localhost:3000;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection 'upgrade';\n        proxy_set_header Host $host;\n        proxy_cache_bypass $http_upgrade;\n    }\n\n}\n```\n\nReplace `yourdomain.com` with your actual domain name and `http://localhost:3000` with the URL where your application is running.\n\nThis configuration tells Nginx to listen on port 80 for incoming connections for `yourdomain.com` and to forward those connections to your application running on `http://localhost:3000`.\n\nRemember to reload or restart Nginx after you make changes to the configuration:\n\n```\nsudo systemctl reload nginx\n```\n\nFor more information on how to configure Nginx, refer to the [official Nginx documentation](http://nginx.org/en/docs/).\n\n## Configuration\n\n| Config Variable       | Default Value              | Description                                                                                                     |\n| --------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------- |\n| `PORT`                | `3000`                     | The port on which the server will run.                                                                          |\n| `INFO_LOG`            | `'access.log'`             | The path to the access log file.                                                                                |\n| `ERROR_LOG`           | `'error.log'`              | The path to the error log file.                                                                                 |\n| `WEBSOCKET_URL`       | `'ws://localhost:${PORT}'` | The URL for the WebSocket connection.                                                                           |\n| `BASIC_AUTH`          | `false`                    | Enable or disable basic authentication.                                                                         |\n| `BASIC_AUTH_USERNAME` | `admin`                    | The username for basic authentication.                                                                          |\n| `BASIC_AUTH_PASSWORD` | `admin`                    | The password for basic authentication.                                                                          |\n| `NODE_ENV`            | `'development'`            | The environment in which the server is running. Can be `'development'`, `'production'`, etc.                    |\n| `CORS`                | `true`                     | Enable or disable CORS.                                                                                         |\n| `CORS_ORIGINS`        | `undefined`                | Comma-separated list of allowed origins. If not defined and NODE_ENV is 'development', all origins are allowed. |\n| `DEBUGMODE`           | `false`                    | Enable or disable debug mode.                                                                                   |\n\n## Built With\n\n- [Node.js](https://nodejs.org/)\n- [Express.js](https://expressjs.com/) - Web framework for Node.js\n- [express-basic-auth](https://www.npmjs.com/package/express-basic-auth) - Simple username and password authentication for Express.js\n- [WebSocket](https://www.npmjs.com/package/ws) - WebSocket implementation for Node.js\n- [EJS](https://ejs.co/) - Embedded JavaScript templating\n- [CORS](https://www.npmjs.com/package/cors)\n- [dotenv](https://www.npmjs.com/package/dotenv)\n- [read-last-lines](https://www.npmjs.com/package/read-last-lines)\n\n## Credits\n\nThe favicon for this application was generated using the following graphics from Twitter Twemoji:\n\n- Graphics Title: `1f5d2.svg`\n- Graphics Author: Copyright 2020 Twitter, Inc and other contributors. Graphics Source can be found [here](https://github.com/twitter/twemoji/blob/master/assets/svg/1f5d2.svg).\n- Graphics License: [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n\n---\n\nBuilt with ❤️ by [zauberware technologies](https://zauberware.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzauberware%2Fweblogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzauberware%2Fweblogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzauberware%2Fweblogger/lists"}