binkabir / faker.ng

Faker.ng is a library for generating Nigerian fake data such as names, addresses, and phone numbers.
31 stars 15 forks source link

Implemented a working version of Faker #5

Closed ozoesono closed 8 years ago

ozoesono commented 8 years ago

Implemented a base working version of Faker.

Instructions

  1. You need to have MongoDB installed. In the db.py file you need to update your Mongo server details (currently set to localhost) and your port (currently set to the default 27017)
  2. When you have this setup you then need to run the db_helper.py script: python db_helper.py, this will create a new faker database in mongo and create a collection called people, and it will populate the database
  3. You need to then run index.py: python index.py, this will start the test server on: IP - 127.0.0.1, if you are running locally and on port 5000
  4. To test the API visit: http://127.0.0.1:5000/api/v1/faker/people sample_api_result sample_data_in_mongo_db
shubie commented 8 years ago

Cool. Impressive set up guide.

Well written. I am thinking this line "self.path = '/Users/ozo/iworkspace/faker.ng/faker.ng/sample-data.json'" on parser.py could pull from the JSON file on the master repo since it's public. It seems to be pulling from your local file system. So every one may have to modify that path locally, I understand this is one time/line thing sha.

Kudos bro.

ozoesono commented 8 years ago

Good spot. Yes I agree completely. If you see the implementation I put a Todo there to externalise it. We are on the same page. Cool stuff. On 6 Feb 2016 17:13, shubie notifications@github.com wrote:Cool. Impressive set up guide.

Well written. I am thinking this line "self.path = '/Users/ozo/iworkspace/faker.ng/faker.ng/sample-data.json'" could pull from the JSON file on master since its public. It seem to be pulling from your local file system. So every one may have to modify that path locally, I understand this is one time/line thing sha.

Kudos bro.

—Reply to this email directly or view it on GitHub.