[Project Expense Cards] - Building the start of my prototype's API

Thought I was gone for a long time again, huh?   With the holidays still here, it's a bit hard to stay glued to the screen so much.  BUT I was actually trying to learn how to build a proper API using NodeJS, Express, and SequelizerJS.  The database that I'll be using for my prototype will be MariaDB, a better offshoot of MySQL that supports the same drivers.

I wanted to use MongoDB, but then I realized that the better choice for relational data will probably be a relational database like MariaDB or Postgres, so I went with MariaDB instead.  I did try it with MongoDB first, but it just wasn't going according to the way I wanted it at that time.  

It hasn't always been smooth sailing however.  I didn't realize that NodeJS doesn't support ES6 modules export so when I would want to write "export const someFunction" it didn't like it at all and would throw an error.

So far, I only have API endpoints for creating a new expense card and retrieving all of the expense cards.  In order to handle HTTP requests and responses better, I picked up SequelizerJS to act as an ORM for me.  It definitely makes it easier and more efficient to perform your CRUD operations.  Check it out at  http://docs.sequelizejs.com/en/v3/.

Now the next step before expanding the API is to handle the response data over on the front-end side with React and Redux!