{"id":17640889,"url":"https://github.com/beace/npm-search","last_synced_at":"2026-02-23T04:04:29.804Z","repository":{"id":98536236,"uuid":"604273086","full_name":"Beace/npm-search","owner":"Beace","description":"A search solution for npm packages，power by elasticsearch","archived":false,"fork":false,"pushed_at":"2023-06-06T13:36:03.000Z","size":1561,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T02:41:13.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Beace.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}},"created_at":"2023-02-20T17:47:33.000Z","updated_at":"2023-09-03T09:28:11.000Z","dependencies_parsed_at":"2025-03-10T09:38:10.276Z","dependency_job_id":"49569d0b-dec4-4d22-a6e7-e9a907c2f53d","html_url":"https://github.com/Beace/npm-search","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/Beace%2Fnpm-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beace%2Fnpm-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beace%2Fnpm-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beace%2Fnpm-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Beace","download_url":"https://codeload.github.com/Beace/npm-search/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252763479,"owners_count":21800502,"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-10-23T06:24:36.295Z","updated_at":"2025-10-18T07:01:51.823Z","avatar_url":"https://github.com/Beace.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm search\n\nA search solution for npm packages，power by [download elasticsearch](https://www.elastic.co/cn/downloads/elasticsearch).\n\n![test](./doc/es.png)\n\n## how to start(develop)\n\n### required\n- [download elasticsearch](https://www.elastic.co/cn/downloads/elasticsearch)\n- [download kibana](https://www.elastic.co/cn/downloads/kibana)\n- Node.js v18\n\n### add config\n\nedit `config/elasticsearch.yml`\n\n```\nvi config/elasticsearch.yml\n```\n\nmodify the default config\n\n\n```yaml\n# ======================== Elasticsearch Configuration =========================\n#\n# NOTE: Elasticsearch comes with reasonable defaults for most settings.\n#       Before you set out to tweak and tune the configuration, make sure you\n#       understand what are you trying to accomplish and the consequences.\n#\n# ----------------------------------- Paths ------------------------------------\n#\n# Path to directory where to store the data (separate multiple locations by comma):\n#\npath.data: ./data\n#\n# Path to log files:\n#\npath.logs: ./logs\n#\n# ---------------------------------- Network -----------------------------------\n#\n# By default Elasticsearch is only accessible on localhost. Set a different\n# address here to expose this node on the network:\n#\nnetwork.host: 0.0.0.0\n#\n# By default Elasticsearch listens for HTTP traffic on the first free port it\n# finds starting at 9200. Set a specific HTTP port here:\n#\n#http.port: 9200\n#\n# For more information, consult the network module documentation.\n#\n#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------\n#\n# The following settings, TLS certificates, and keys have been automatically\n# generated to configure Elasticsearch security features on 11-02-2023 10:18:30\n#\n# --------------------------------------------------------------------------------\n\n# Enable security features\nxpack.security.enabled: false\n\nxpack.security.enrollment.enabled: true\n\n# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents\nxpack.security.http.ssl:\n  enabled: true\n  keystore.path: certs/http.p12\n\n# Enable encryption and mutual authentication between cluster nodes\nxpack.security.transport.ssl:\n  enabled: true\n  verification_mode: certificate\n  keystore.path: certs/transport.p12\n  truststore.path: certs/transport.p12\n# Create a new cluster with the current node only\n# Additional nodes can still join the cluster later\ncluster.initial_master_nodes: [\"BeacedeMac-Studio.local\"]\n\n# Allow HTTP API connections from anywhere\n# Connections are encrypted and require user authentication\nhttp.host: 0.0.0.0\n\n# Allow other nodes to join the cluster from anywhere\n# Connections are encrypted and mutually authenticated\n#transport.host: 0.0.0.0\n\n#----------------------- END SECURITY AUTO CONFIGURATION -------------------------\n```\n\n### run elasticsearch\n\n```\n./bin/elasticsearch\n```\n\n### run kibana\n```\n./bin/kibana\n```\n\n### Create Index Mapping\n\n\u003e PUT /npm_packages\n\n```json\n{\n  \"mappings\": {\n    \"properties\": {\n      \"package\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"text\"\n          },\n          \"description\": {\n            \"type\": \"text\"\n          },\n          \"keywords\": {\n            \"type\": \"text\"\n          },\n          \"version\": {\n            \"type\": \"text\",\n            \"index\": false\n          },\n          \"date\": {\n            \"type\": \"date\",\n            \"index\": false\n          },\n          \"maintainers\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"username\": {\n                \"type\": \"keyword\"\n              },\n              \"email\": {\n                \"type\": \"keyword\"\n              }\n            }\n          },\n          \"scope\": {\n            \"type\": \"keyword\"\n          },\n          \"dist-tags\": {\n            \"dynamic\": \"true\",\n            \"type\": \"object\"\n          }\n        }\n      },\n      \"downloads\": {\n        \"properties\": {\n          \"all\": {\n            \"type\": \"long\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n## start\n\n```bash\n$ npm start\n```\n\nuse `npm search` command\n\n```bash\n$ npm search react --registry http://localhost:3000\n```\n\nsee\n\n![npm search](./doc/npm_search.png)\n\n\n## npm test\n\nrun test file\n\n```bash\n$ npm test\n```\n\n![test](./doc/test.png)\n\n## Deploy\n\ncopy the `.env` and `docker-compose.yaml` files. run\n\n```\n$ docker-compose up -d\n```\n\nopen http://localhost:5601\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeace%2Fnpm-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeace%2Fnpm-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeace%2Fnpm-search/lists"}