{"id":15295982,"url":"https://github.com/ajayos/server","last_synced_at":"2026-01-23T07:05:11.140Z","repository":{"id":184838509,"uuid":"672506975","full_name":"Ajayos/Server","owner":"Ajayos","description":"Express-based HTTP server, handles server-related functionalities like starting and stopping the server, retrieving host information, getting active network interfaces, and formatting memory usage, with usage of environment variables for configuration.","archived":false,"fork":false,"pushed_at":"2025-09-13T08:17:15.000Z","size":1416,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T01:33:14.076Z","etag":null,"topics":["express","express-js","expressjs","http","http-server","node"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ajayos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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},"funding":{"github":"Ajayos"}},"created_at":"2023-07-30T10:20:04.000Z","updated_at":"2024-10-14T05:13:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"23cfc069-e89a-4ebb-9ed6-bb61d303ddcf","html_url":"https://github.com/Ajayos/Server","commit_stats":null,"previous_names":["ajayos/server"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Ajayos/Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajayos%2FServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajayos%2FServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajayos%2FServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajayos%2FServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ajayos","download_url":"https://codeload.github.com/Ajayos/Server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajayos%2FServer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28682284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"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":["express","express-js","expressjs","http","http-server","node"],"created_at":"2024-09-30T18:08:51.361Z","updated_at":"2026-01-23T07:05:11.124Z","avatar_url":"https://github.com/Ajayos.png","language":"JavaScript","readme":"# EXPRESS SERVER\n\n## Express-based HTTP server, handles server-related functionalities like starting and stopping the server, retrieving host information, getting active network interfaces, and formatting memory usage, with usage of environment variables for configuration.\n\n[![@ajayos/Server](https://img.shields.io/npm/v/@ajayos/server.svg)](https://www.npmjs.com/package/@ajayos/server)\n\nThis package is a powerful and flexible HTTP server built on top of Express, offering various server functionalities and utilities for developers.\n\n## Installation\n\n```bash\nnpm install @ajayos/server\n```\n\n## Quick Start\n\n### Basic Usage\n\nHere’s a quick example to get your server up and running:\n\n```javascript\nconst { SERVER } = require('@ajayos/server'); // Import the server package\n\nconst app = new SERVER({\n\tport: 3000, // PORT\n}); // Create a new server instance\n\n// Define a route for the root URL\napp.get('/', async (req, res) =\u003e {\n\tres.send('Hello World'); // Send a simple response\n});\n\n// Define another route\napp.get('/hey', async (req, res) =\u003e {\n\tres.json({ data: 'hello world' }); // Respond with JSON data\n});\n\n// Start the server\napp.start(); // Call the start method to begin listening\n```\n\nHere’s a more comprehensive example showcasing various functionalities:\n\n```javascript\nconst { SERVER } = require('@ajayos/server'); // Import the server package\n\nconst app = new SERVER({\n\tport: 3000,\n}); // Create a new server instance\n\n// Middleware to log requests\napp.use((req, res, next) =\u003e {\n\tapp.log(`${req.method} request for '${req.url}'`);\n\tnext(); // Call the next middleware or route handler\n});\n\n// Define routes\napp.get('/', async (req, res) =\u003e {\n\tres.send('Welcome to the Express Server!'); // Send a welcome message\n});\n\n// Start the server with error handling\napp\n\t.start()\n\t.then(() =\u003e app.log(`Server running on port ${app.port}`))\n\t.catch(err =\u003e app.log('Failed to start server: ' +  err, 'error'));\n```\n\n## Features\n\n- **Easy Setup**: Quick configuration with minimal setup.\n- **Custom Routing**: Supports GET, POST, PUT, and DELETE methods for routing.\n- **Host Information**: Easily retrieve host information and active network interfaces.\n- **Server Management**: Handle server startup and graceful shutdown processes.\n\n## Example\n\nAdditional example of how to use the package can be found in the [example](./example.js) file.\n\n`const app = express();`\n\nuse with\n\n```\napp.app\n```\n\n## Documentation\n\nView documentation on [API](./API.md)\n\n\n## License\n\nThis package is open-source and available under the [Apache-2.0 License](./LICENSE). Feel free to use, modify, and distribute it as you see fit.\n","funding_links":["https://github.com/sponsors/Ajayos"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajayos%2Fserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajayos%2Fserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajayos%2Fserver/lists"}