-
-
Notifications
You must be signed in to change notification settings - Fork 51
Home
Shivam Mathur edited this page May 14, 2016
·
3 revisions
CountryCity API is a REST API to get names of all the countries in the world. It can also be used to get names of all the cities in a country.
- Download the countrycity API using composer by executing the command below.
composer global require codeyeah/countrycity "master-dev"
- Install the countrycity API using by executing the command below.
composer create-project codeyeah/countrycity countrycity "master-dev" --prefer-dist
- Download and install MongoDB from here
- Start MongoDB server by executing the below command.
mongod --dbpath {countrycityapipath}/data/db
- Install MongoDB pecl extension by following installation instruction from here
- You are all set.
/get/countries/
/get/cities/{countryName}
{"error":"true", "message": "error message here"}