Giter Club home page Giter Club logo

moquery's Introduction

###简介 手机归属地查询接口

###依赖

  • node.js
  • restify
  • redis-server
  • sqlite3 (可选)

###安装部署 首先安装redis-server,如果有brew

brew install redis

同时安装hiredis可获得更高的性能

brew install hiredis

安装依赖库

cd moquery
npm install -d 

启动redis-server,导入数据

./bin/export_to_csv.sh
./bin/import_to_redis.sh

启动HTTP服务

node app.js

通过curl命令测试

curl -is http://localhost:3000/mobile/13800138000

curl -is http://localhost:3000/mobile/19012312312334

###关于数据 归属地数据库从网上下载,共包含249145条记录。 telocation.db是下载的原始sqlite数据文件 data.csv是从telocation.db导出的csv文本格式

可以通过以下命令重新生成

./bin/export_to_csv.sh

执行后./db/data.csv会被覆盖

moquery's People

Contributors

roymax avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.