{"id":18483284,"url":"https://github.com/cloudcmd/webfind","last_synced_at":"2025-10-30T09:11:40.406Z","repository":{"id":21060889,"uuid":"24360160","full_name":"cloudcmd/webfind","owner":"cloudcmd","description":"Web find files","archived":false,"fork":false,"pushed_at":"2020-04-16T11:38:59.000Z","size":234,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T05:36:30.769Z","etag":null,"topics":["cloudcmd","find","javascript","nodejs"],"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/cloudcmd.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-23T06:53:27.000Z","updated_at":"2020-04-16T11:38:58.000Z","dependencies_parsed_at":"2022-09-17T22:05:01.887Z","dependency_job_id":null,"html_url":"https://github.com/cloudcmd/webfind","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fwebfind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fwebfind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fwebfind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fwebfind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudcmd","download_url":"https://codeload.github.com/cloudcmd/webfind/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247902508,"owners_count":21015462,"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","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":["cloudcmd","find","javascript","nodejs"],"created_at":"2024-11-06T12:35:05.263Z","updated_at":"2025-10-30T09:11:40.307Z","avatar_url":"https://github.com/cloudcmd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"WebFind\n=======\n\nFind files in browser with help of serverside.\n\n## Install\n\n`npm i webfind -g`\n\n## Use as standalone\n\nStart `webfind`, go to url `http://localhost:1337`\n\n## API\n\n### Client API\n\n**webfind(element [, prefix], callback)**\n\n- element   - html element, or selector\n- prefix    - (optional) prefix to url (same as in server)\n- callback  - function to call after init\n\nWhen prefix set in server and client, you should use same prefix in html.\nFor example, if you use prefix `/webfind` you should connect\nwebfind script in this way:\n\n`\u003cscript src=\"/webfind/webfind.js\"\u003e\u003c/script\u003e`\n\n\n### Server API\n\n**webfind(options);**\n\nCould be used as middleware, or for init `WebFind`.\n\n```js\nwebfind({\n    server: server,/* only one should be passed: */\n    socket: socket,/* server or socket  */\n    online: true, /* default */\n    minify: true, /* default */\n    prefix:'/webfind' /* default */\n})\n```\n\n**webfind.middle(options);**\n\nMiddleware function if there is a need of init `socket` in another place.\n\n```js\nwebfind.middle({\n    prefix: '/webfind', /* default */\n    online: true, /* default */\n    minify: true, /* default */\n})\n```\n\n## Use as middleware\n\nTo use `WebFind` in your programs you should make local install:\n\n`npm i webfind express --save`\n\nAnd use it in your program\n\n```js\n/* server.js */\n\nvar webfind     = require('webfind'),\n    http        = require('http'),\n    express     = require('express'),\n    \n    app         = express(),\n    server      = http.createServer(app),\n    \n    port        = 1337,\n    ip          = '0.0.0.0';\n    \napp .use(webfind({\n        server: server,\n        online: true /* load jquery and socket.io from cdn */\n    }))\n    .use(express.static(__dirname));\n\nserver.listen(port, ip);\n```\n\n```html\n\u003c!-- index.html --\u003e\n\n\u003cdiv class=\"webfind\"\u003e\u003c/div\u003e\n\u003cscript src=\"/webfind/webfind.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    (function() {\n        'use strict';\n        \n        window.addEventListener('load', load);\n        \n        function load() {\n            window.removeEventListener('load', load);\n            \n            webfind('.webfind', function() {\n                console.log('webfind ready')\n            });\n        }\n    })()\n\u003c/script\u003e\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcmd%2Fwebfind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudcmd%2Fwebfind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcmd%2Fwebfind/lists"}