Closed patcon closed 9 years ago
OK, tried with redis too, and the same error. (My postgres has been broken for ages, so I always use VM's for that, but was hoping to avoid that for a node app)
Just so I know I'm not crazy and don't spin my wheels any longer, can you help me do a sanity check and reclone the project into /tmp
or something and let me know if the sails-disk instructions work? :)
Just recloned on my Windows box - it's working as expected, but I realized that my instructions were confusing. You don't need to run sails-migrations for sails-disk, as it is a nosql solution that creates relations as needed. So you just need to sails lift and continue along your merry way.
Docs updated. Let me know if this works!
OK, cool. I guess no data is possible with sails-disk, but I can get empty array responses via curl
ing
localhost:1337/councillor
localhost:1337/ward
localhost:1337/user
localhost:1337/motion
I guess that's the most I can expect to see without getting a db like mysql working, huh? Anyhow, thanks doug. I'll get on that later
Data is indeed possible with sails-disk, it's just not an adaptor that's compatible with sails-migrations. You don't need to create tables with sails-disk as relations are created on the fly, so things like migrations are irrelevant anyway :)
Both setups right now leave you with an empty db with working endpoints, and if you were to POST to any of the endpoints you mentioned above you'd have data coming back & sails-disk handling persistence.
This comes back to the problem of working out the best way to bootstrap people with a starting db. But for now you can reference the examples in db/init and drop those into config/bootstrap.js on your first sails-lift to populate the DB that way.
Over lunch today I pushed a postgres db snapshot & associated instructions to the repo. On the weekend I'll use this data to generate a Waterline script so people can get up and running on any adaptor.
Went through the instructions as provided.
Doesn't seem to be anything in here to select, if we're using
sails-disk
. Presumably you mean in an env file likeconfig/env/development.js
? I changed the commented line here: https://github.com/designcofounders/toronto-city-hall-api/blob/master/config/env/development.js#L21-L22Then ran:
Any offhand thoughts on what's up?
EDIT: Oops. Pasted wrong output