Day 13 of 30 Min Project 12/27/14

Missed Days 10 - 12 due to Christmas and family stuff (12/24 - 12/26)

Today:
  • Figure out why convict isn’t respecting my env variable for PORT so that everything runs right
    • OK, one weird thing is that the settings file appears to get loaded before any of my process environment variables are defined, which would explain why it’s not showing up properly
    • Hmm, can’t see how that’s actually happening :/
    • It’s actually happening before gulp even gets going - weird
    • To get around it for the moment we’ll just set the port and db in their own settings file to make it easier for the moment
    • OK, did this export NODE_ENV=test && gulp
    • Now it loads the right config
    • But my tests are not running :/
    • Hmm, so clear-test-data gets run (but the db isn’t there)
    • but setup-test-data doesn’t appear to get run?
  • Ok, finally got everything running as it should again!
Next steps:
  • Get tests going that use test data
    • We have a few controllers/endpoints we need to test
      • /token - gets a valid token for a logged in user
      • /user - gets current user that is logged in via that token