{"id":25600599,"url":"https://github.com/thezem/picko","last_synced_at":"2026-04-11T06:02:45.071Z","repository":{"id":168075216,"uuid":"643344708","full_name":"thezem/Picko","owner":"thezem","description":"A hybrid library blending Express and Socket.IO for a smooth server-client experience. the best of both worlds with combining Express for handling HTTP requests and Socket.IO for real-time communication.","archived":false,"fork":false,"pushed_at":"2024-03-16T21:03:46.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-02T04:18:27.224Z","etag":null,"topics":["express","socket-io","webframework"],"latest_commit_sha":null,"homepage":"","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/thezem.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}},"created_at":"2023-05-20T21:28:56.000Z","updated_at":"2023-06-02T22:21:49.000Z","dependencies_parsed_at":"2025-06-08T06:01:24.167Z","dependency_job_id":null,"html_url":"https://github.com/thezem/Picko","commit_stats":null,"previous_names":["antiihope/picko"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thezem/Picko","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thezem%2FPicko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thezem%2FPicko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thezem%2FPicko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thezem%2FPicko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thezem","download_url":"https://codeload.github.com/thezem/Picko/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thezem%2FPicko/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31670383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"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":["express","socket-io","webframework"],"created_at":"2025-02-21T15:27:06.930Z","updated_at":"2026-04-11T06:02:45.051Z","avatar_url":"https://github.com/thezem.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Picko: A Hybrid HTTP Server\n\nPicko is a powerful hybrid HTTP server that utilizes the best of both worlds with its combination of Express and Socket.IO. This package provides a seamless way to handle HTTP requests, making it a perfect tool for developers looking to create a flexible and really fast server.\n\n## Features\n\n- Built on the tried-and-true Express framework and Socket.IO libraries\n- Provides flexible routing options for GET, POST, and other HTTP methods\n- Offers real-time communication and event-driven architecture with Socket.IO\n- Simple and easy-to-use API for HTTP request handling\n- A middle layer for authentication and authorization\n- A client for communicating with the server via Socket.IO\n\n## Getting Started\n\nTo get started with Picko, first, install the package with the following command:\n\n```\nnpm install picko\n```\n\nOnce installed, you can initialize the server by creating a new instance of the `Picko` class and passing in any options you desire. Then, you can listen on a port of your choosing using the `listen()` method.\n\n```javascript\nconst Picko = require('picko/server');\n\n// simple server\nconst picko = new Picko();\n\n// Authentication for both Express and Socket.io\npicko.authenticate((headers, callback) =\u003e {\n  if (headers.authorization === '555') {\n    callback(null, true); // Authorized\n  } else {\n    callback(401, false); // Unauthorized\n  }\n});\n\n// Define your routes\npicko.get('/', (req, res) =\u003e {\n  res.send('Hello, world!');\n});\n\n// Start listening on port 3000\npicko.listen(3000, () =\u003e {\n  console.log('Server started on port 3000');\n});\n```\n\nYou can also create a client instance of Picko using the `PickoClient` class to communicate with the server via Socket.IO. The `PickoClient` class allows you to send GET and POST requests to the server and receive responses.\n\n```javascript\nconst PickoClient = require('picko/client');\nconst client = new PickoClient();\n\n// Send a GET request to the server\nconst data = await client.get('/api/data');\n\n// Send a POST request to the server\nconst res = await client.post('/users', {\n  name: 'John Doe',\n  email: 'johndoe@example.com',\n});\n```\n\n## Why?\n\nI really do like the simplicity of Express, but I also like the real-time communication that Socket.IO provides. I wanted to create a server that could handle both HTTP requests and real-time communication, so I decided to combine the two. I also wanted to create a server that was easy to use and had a simple API, so I created _Picko_.\n\n### No websocket support on the client side?\n\nNo problem! Picko will automatically fall back to HTTP polling if the client does not support WebSockets.\n\n### You don't wanna use the client?\n\nNo problem! Picko is built on top of Express, so you can use it just like you would any other Express server.\n\n- You can easily write your server in Express-like Api\n- And use a fetch-like client to communicate with the server\n- isn't that cool?\n\n## How it Works\n\nPicko builds upon the Express framework, offering a familiar API for defining routes and handling HTTP requests. It also utilizes the Socket.IO library to enable real-time communication with clients via WebSockets.\n\nThe Picko class sets up an instance of the Express app and a Socket.IO server. Calling the listen() method starts the server, allowing it to listen for incoming requests.\n\nRoutes are defined using the get() and post() methods on the Picko instance, similar to Express. Route handlers are provided as callback functions that execute when a request is received.\n\nTo communicate with the server via Socket.IO, use the PickoClient class. It supports sending GET and POST requests to the server and receiving responses through callback functions.\n\n## Todo\n\n- [✅] Add support for Dynamic Routes in socket.io\n- [ ] Add support for Express-like middlewares\n\n###### !NO HASSL3\n\n###### @antiihope\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthezem%2Fpicko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthezem%2Fpicko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthezem%2Fpicko/lists"}