One Step Forward...
February 04, 2019
Today I worked on re-organizing GFT. Kind of. This app is starting to feel like one step forward, two steps back, so trying to keep the long-term goal in mind!
I got to the point where I really can’t proceed without being able to alter my database tables without dropping all the data at the same time. So I need to implement migrations. It will be a really big benefit in the long run, but I kind of need to start from scratch on the app, because the most documented way of implementing migrations—and that’s not to say it’s very well-documented at all—is to to use the
sequelize-cli package. Lovely that there’s a package that will do the heavy lifting. But I’d already done a lot of that heavy lifting, so there’s a lot to delete first!
One of those tutorials also mentions setting up server logging, so I kind of fell into a rabbit hole about that too! The first video I watch talked about logging best practices and why you do it in the first place. This video is one I have yet to watch yet, but seems to talk about using the
winston logger, which appears to be the most popular one. Another popular logging tool is
morgan (the one mentioned in the
sequelize-cli walk-through), and this article talks about how to use it in conjunction with
winston. And finally this discussion on StackOverflow is about advanced logging, which I’m definitely far from, but may find useful.
I have yet to try any of this, for fear of this becoming yet another rabbit hole that delays a proper launch of this app even longer. But it’s definitely something to keep front of mind for the (hopefully near) future.
I’ve reset the app so that it’s ready to go with
sequelize-cli next time I have time to code. That will be in a few days though—lots of theatre to see this week!