{"id":22064713,"url":"https://github.com/ldarren/xin-node","last_synced_at":"2026-05-11T02:20:53.654Z","repository":{"id":46046489,"uuid":"171033969","full_name":"ldarren/xin-node","owner":"ldarren","description":"xin api server","archived":false,"fork":false,"pushed_at":"2023-04-10T20:13:33.000Z","size":46,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T00:21:16.920Z","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/ldarren.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2019-02-16T17:57:26.000Z","updated_at":"2021-11-18T01:40:07.000Z","dependencies_parsed_at":"2022-08-30T21:20:33.844Z","dependency_job_id":null,"html_url":"https://github.com/ldarren/xin-node","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/ldarren%2Fxin-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldarren%2Fxin-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldarren%2Fxin-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldarren%2Fxin-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldarren","download_url":"https://codeload.github.com/ldarren/xin-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245144973,"owners_count":20568056,"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":[],"created_at":"2024-11-30T19:13:17.968Z","updated_at":"2026-05-11T02:20:53.597Z","avatar_url":"https://github.com/ldarren.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xin-node\nKloud Konsole Xin service api server\n\n## setup\nafter cloning the project do a\n\n```\nnpm ci\n```\n\nto install the dependencies\n\nxin service has following main dependencies\n- pico-api\n- mysql database\n- AWS cognito service\n\n## setup config\nxin-node is powered by [pico-api](https://github.com/ldarren/pico-api), and hence they shared the same configuration format.\n\ncreate a configuration file as below, and save it to `cfg/xin.json`\n```json\n{\n    \"app\":{\n\t\t\"signalTTL\": 60000,\n\t\t\"master\": true,\n\t\t\"apis\": [\n\t\t\t\"api/index.json\"\n\t\t],\n\t\t\"models\": [\n\t\t\t\"models/index.js\"\n\t\t]\n    },\n    \"mods\":{\n        \"webServer\":{\n            \"mod\":\"web\",\n            \"allowOrigin\":\"*\",\n            \"sep\":[\"\u0026\"],\n            \"uploadWL\":[],\n            \"port\":8888\n        },\n        \"storage1\":{\n            \"mod\":\"picos-mod-mysql\",\n\t\t\t\"master\": {\n\t\t\t\t\"host\": \"{MAIN_DB_DOMAIN}\",\n\t\t\t\t\"port\": {MAIN_DB_PORT},\n\t\t\t\t\"user\": \"{MAIN_DB_USER}\",\n\t\t\t\t\"password\": \"{MAIN_DB_PASS}\",\n\t\t\t\t\"database\": \"{MAIN_DB_NAME}\",\n\t\t\t\t\"acquireTimeout\": 120000,\n\t\t\t\t\"waitForConnections\": true,\n\t\t\t\t\"connectionLimit\": 2,\n\t\t\t\t\"queueLimit\": 99\n\t\t\t}\n\t\t},\n\t\t\"storage2\":{\n            \"mod\":\"picos-mod-mysql\",\n\t\t\t\"master\": {\n\t\t\t\t\"host\": \"{SEC_DB_DOMAIN}\",\n\t\t\t\t\"port\": {SEC_DB_PORT},\n\t\t\t\t\"user\": \"{SEC_DB_USER}\",\n\t\t\t\t\"password\": \"{SEC_DB_PASS}\",\n\t\t\t\t\"database\": \"{SEC_DB_NAME}\",\n\t\t\t\t\"acquireTimeout\": 120000,\n\t\t\t\t\"waitForConnections\": true,\n\t\t\t\t\"connectionLimit\": 2,\n\t\t\t\t\"queueLimit\": 99\n\t\t\t}\n\t\t}\n    }\n}\n```\n\n### setup sql database\nupdate `cfg/xin.json` with your database configuration, after that execute `cfg/table.sql` to main and secondary databases\n```sql\nmysql -u{username} -p \u003c cfg/table.sql\n```\n\nafter that, update `cfg/app.kloudkonsole.env.json` with the cognito setting then run:\n```\nnpm run migrate\n```\nto populate required data to the main and secondary databases\n\n### setup cognito\ndownload jwks setting from AWS cognito, with following url, replace the string in `{}`\n```\nwget https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json\n```\n\nkeep the jwks.json in `cfg/` and add the path in `xin.dev.json`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldarren%2Fxin-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldarren%2Fxin-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldarren%2Fxin-node/lists"}