add query code
add flask config practice.