Now that I have at least one working route for my budget app I’m turning my attention to the front end. I’d like to get the full stack wired up end-to-end with displaying one table of data so I can make sure I haven’t missed anything major! For this I’ve decided to use Bootstrap in the form of a premade layout as I don’t fancy myself much of a CSS designer!
I realised that returning the username with the JWT is not useful to the rest of the app - I must return the
user_id instead. This can then be used in future requests.
Instead of creating all those routes to create and update the accounts, categories and transactions, I decided for testing everything and getting it wired up I would just write the route to get all the transactions for a single user and then expand on the routes as required.
My server implements a RESTful API to be used with the budget app, but in order to do that I need to decide on the routes I will need to access. This post outlines the initial routes I’ve decided to implement.
Now that my Node server is up and running (and secure), it’s finally time to actually do something with it! My first project will be purely software; a budgeting app that can be used to record transactions and define a monthly limit on each category to keep track of finances using a variation on the ‘envelope’ strategy.
After installing MySQL I realised that I needed a better solution than just storing plaintext usernames and passwords in an authentication table. So while I’m on my security-spree I’ve decided to implement the authentication middleware for the Node App including salting and hashing passwords using
bcrypt and issuing JSON Web Tokens (JWT) to authenticate subsequent requests.
With my server now secured I’m installing MySQL and phpMyAdmin for the database and to view and configure it via a GUI.
In my last blog post I registered a new domain name and installed a Let’s Encrypt certificate to configure HTTPS, but now I reconfigured it so Jenkins would be secured too and could be reached on