marketinf-geo
This repository is the location API of Marketinf.
Usage
API Routes
GET: /countries - Returns the list of all available country codes as an array GET: /countries/:code - Returns the geographical information of the specified country GET: /countries/:code/:area - Returns the geographical information of the specified area in the specified country
Dev
Prerequisites
- Git
- Node.js and npm Node ^4.2.3, npm ^2.14.7
- Ruby and then
gem install sass
- Grunt (
npm install --global grunt-cli
) - MongoDB - Keep a running daemon with
mongod
- [Tor] sudo port install tor
Developing
-
Run
npm install
to install server dependencies. -
Run
grunt
to start the development server. It should automatically open the client in your browser when ready.
Adding new countries to DB
-
Edit /opt/local/etc/tor/torrc Add line MaxCircuitDirtiness 100
-
Run tor
-
Run
node ./tool/index.js Türkiye 2 4 6
Script parameters:
- Country name in its native language.
- Administrative area level of the country.
- Administrative area level of the cities.
- Administrative area level of the districts.
- You can check the administrative area names by trying various queries in Overpass API.
- Go to www.openstreetmap.org
- Find the "Relation" entities and record their "admin_level"'s