predbdotovh / pre-api

https://predbdotovh.github.io/pre-api/
MIT License
42 stars 7 forks source link

Api Deployment #11

Closed yoooov closed 3 years ago

yoooov commented 4 years ago

Could you please provide me with steps to deploy the api ? I made a simple go install with minor changes regarding hostnames and url/port constants in the source code, service listens locally on port 8088 but i can't GET any response for endpoints ... TYVM

hrxcodes commented 3 years ago

Could you please provide me with steps to deploy the api ? I made a simple go install with minor changes regarding hostnames and url/port constants in the source code, service listens locally on port 8088 but i can't GET any response for endpoints ... TYVM

If you get this:

{
    "status": "error",
    "message": "404 Not Found",
    "data": null
}

then it means that your hostname is wrong: https://github.com/predbdotovh/pre-api/blob/989bb923f734467efd544af423c625c4094681ff/router.go#L10

ERR1R commented 3 years ago

Hi @hrxcodes

I have a few qstions and i hope you can help me. So ive build the go binary but it seems i miss some step. I thought the binary would auto create the needed tables but that is not the case. Ive created the tables from info from the sourcecode but that does not seem to work. I was wondering if you could share your database schema and the sphinx config because i prolly miss something easy.

hrxcodes commented 3 years ago

I don't have it running, I just tested to deploy it myself. Based on that testing I wrote the above reply, so go over your setup again 😃

ERR1R commented 3 years ago

ive got it running.. the sphinx config was new for me but i managed with google..

Thanks!