{"id":21898252,"url":"https://github.com/fasibio/funk-js-agent","last_synced_at":"2026-04-10T00:38:49.660Z","repository":{"id":47980898,"uuid":"201473478","full_name":"fasibio/funk-js-agent","owner":"fasibio","description":"An Agent to call direkt from your javascript/node application to funk server","archived":false,"fork":false,"pushed_at":"2022-12-04T06:46:59.000Z","size":223,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T16:12:07.593Z","etag":null,"topics":["funk","library","nodejs","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fasibio.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}},"created_at":"2019-08-09T13:33:00.000Z","updated_at":"2019-08-15T06:32:31.000Z","dependencies_parsed_at":"2023-01-24T00:16:25.816Z","dependency_job_id":null,"html_url":"https://github.com/fasibio/funk-js-agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasibio%2Ffunk-js-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasibio%2Ffunk-js-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasibio%2Ffunk-js-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasibio%2Ffunk-js-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fasibio","download_url":"https://codeload.github.com/fasibio/funk-js-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244909139,"owners_count":20530177,"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":["funk","library","nodejs","typescript"],"created_at":"2024-11-28T14:25:03.707Z","updated_at":"2025-12-30T20:47:45.284Z","avatar_url":"https://github.com/fasibio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Funk-js-agent\nThis is a lib to send Logmessages directly from your Javascript/Node.js Application to a [Funkserver](https://github.com/fasibio/funk-server)\n\n\n\n\n## How to use\nYou need a running [Funkserver](https://github.com/fasibio/funk-server).\n\nYou need to know the Access-Key. \n\n## Installation\n\n```\nnpm install funk-agent --save\n```\n\n## Integration\n\nOptimal you have a loging lib like winston or something else. \n\n**IMPORTANT:**\n\nset this Code by Applicationstart: \n```\nconst {FunkAgent} = require('funk-agent')\nconst funk_con = new FunkAgent(\"[ServerURL]\",\"[ACCESSKEY]\")\n```\n\nAnd now you can log inside you logging event. \n\n```\n  funk_con.sendSugar({\n    attr: {\n      container: \"Test\", // attributesinformation to specify this application\n      hostname: \"spezial host\", // attributesinformation to specify the server\n\n    },\n    data: [{ // A free to choose obj. use what you want. \n      message: \"high obj\", \n      time: new Date(Date.now()),\n      request_time: 0.002,\n      request_type: \"ms\",\n    }],\n    searchindex: \"test-js-agent-sugar\" //the elasticsearchindex where this information will be saved. \n  })\n```\n\nYou can choose the function ```sendSugar``` and ```send```\n\n```sendSugar``` is a littlebit slower but easier to use\n\n```send``` is faster but more complex. \n\nNormally ```sendSugar``` will be fast enough. \n\n\n## Good to know\n\nIf the application lost the connection to your server. It will automatically try to reconnect. \nYou send messages will be add to a queue and sending later. After connection is back. \n\n\n## Example Project\n\nHere is a small example Projekt: [funk-js-agent-example](https://github.com/fasibio/funk-js-agent-example)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasibio%2Ffunk-js-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffasibio%2Ffunk-js-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasibio%2Ffunk-js-agent/lists"}