Closed steve-mt closed 7 years ago
sorry for the late reply, is this happening on a clean/new clone or did you change something in the init.sql
file
Hello, sorry for the late reply myself. Yes, it was.
it works for me, here is a complete list of things i did from a clean dir
~/tmp$ mkdir example-api
~/tmp$ cd example-api
~/tmp/example-api$ git init
Initialized empty Git repository in /Users/ruslantalpa/tmp/example-api/.git/
~/tmp/example-api$ git remote add upstream https://github.com/subzerocloud/postgrest-starter-kit.git
~/tmp/example-api$ git fetch upstream
remote: Counting objects: 470, done.
remote: Total 470 (delta 0), reused 0 (delta 0), pack-reused 470
Receiving objects: 100% (470/470), 1.10 MiB | 184.00 KiB/s, done.
Resolving deltas: 100% (183/183), done.
From https://github.com/subzerocloud/postgrest-starter-kit
* [new branch] master -> upstream/master
~/tmp/example-api$ git merge upstream/master
~/tmp/example-api$ docker-compose up -d
WARNING: The MAX_ROWS variable is not set. Defaulting to a blank string.
WARNING: The PRE_REQUEST variable is not set. Defaulting to a blank string.
Creating postgreststarterkit_db_1 ...
Creating postgreststarterkit_rabbitmq_1 ...
Creating postgreststarterkit_rabbitmq_1
Creating postgreststarterkit_db_1 ... done
Creating postgreststarterkit_postgrest_1 ...
Creating postgreststarterkit_rabbitmq_1 ... done
Creating postgreststarterkit_pg_amqp_bridge_1 ...
Creating postgreststarterkit_postgrest_1 ... done
Creating postgreststarterkit_openresty_1 ...
Creating postgreststarterkit_openresty_1 ... done
~/tmp/example-api$ curl http://localhost:8080/rest/todos?select=id,todo
{"message":"Database connection lost, retrying the connection."}~/tmp/example-api$
~/tmp/example-api$ curl http://localhost:8080/rest/todos?select=id,todo
[{"id":1,"todo":"item_1"},{"id":3,"todo":"item_3"},{"id":6,"todo":"item_6"}]~/tmp/example-api$
#####
this is where in another terminal window i executed
subzero dashboard
then changed item_1 to item_1 update
saved the file, then saw this in subzero cli
./db/src/sample_data/data.sql changed Starting code reload ------------------------ Ready ---------------------------------------
#####
after getting back to the first window, i reexecuted the call and got the correct response
~/tmp/example-api$ curl http://localhost:8080/rest/todos?select=id,todo
[{"id":1,"todo":"item_1_update"},{"id":3,"todo":"item_3"},{"id":6,"todo":"item_6"}]~/tmp/example-api$
make sure you have the latest subzero-cli
https://github.com/subzerocloud/subzero-cli
The issue seems to be because of me forgetting to install sqitch
I'm sorry for wasting your time.
Thank you so much for helping me and for the hard work you put into this project 💯
Hello, thank you for open sourcing this project it is quite interesting and I want to learn more about it. I am facing some issues regarding the code reload, as described below.
Every time I do a change in data
db/src/sample_data/data.sql
as a specified here the stack breaks down. I start getting the following errorsOpenResty
pg-amqp-bridge
curl
I am running on latest master. Macos, latest stable docker version