Recent

Author Topic: [SOLVED] Brook,JSON,MySQL  (Read 5127 times)

aradeonas

  • Hero Member
  • *****
  • Posts: 824
[SOLVED] Brook,JSON,MySQL
« on: May 26, 2014, 11:55:47 am »
hi
im a beginer in brook and i need a simple demo that use Brook framework and connect to mysql and get data in JSON fromat.
brook examples use postgresql and i dont know it.
any one done it before?
thanks
« Last Edit: May 29, 2014, 03:14:30 pm by aradeonas »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Brook,JSON,MySQL
« Reply #1 on: May 26, 2014, 12:36:25 pm »
It's just a matter of changing the database properties, everything else should be the same.

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: Brook,JSON,MySQL
« Reply #2 on: May 26, 2014, 04:04:43 pm »
I'm done it but it says "HTTP method not allowed for the requested resource. "
this demo and upload demos in simple folder show that error.
i found http://lists.lazarus.freepascal.org/pipermail/lazarus/2014-February/086014.html but it does not help.
?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Brook,JSON,MySQL
« Reply #3 on: May 27, 2014, 06:45:02 pm »
this is the simplest that I can create that fulfills mysql(-55) connection & json response. simply run and request /person/get/1 or /person/get/2. Any other id shall give empty name, but no error. don't forget to change database properties & port + root url settings (if required).

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: Brook,JSON,MySQL
« Reply #4 on: May 29, 2014, 03:13:20 pm »
thank Leledumbo very much
it is what i want,a simple demo!

 

TinyPortal © 2005-2018