The Cat API needs a database to persist information about cats permanently, so that users don't lose their data when the server restarts.
Your mission, should you choose to accept it, is to spike into determining what needs to be done to setup a SQL database for your Cat API project. This is a common thing to do when there are technical uncertainties, and will allow us to better define the app's requirements.
- Information must be persisted in a database so that user data is available when the Express.js server is restarted
- The database should be a relational database rather than Nosql because our data schema (cats and breeds) is well defined and unlikely to change
- The database should be lightweight in terms of performance and easy to operate
Sqlite is a good choice which fulfills all the above requirements. In a production project you might end up picking another database from this list depending on your project's needs.
- Branch from
master
on the Cat API - Setup sqlite to open a sample database from a file on disk using this node module
- When the express JS server starts up, run a query that selects all the employees and logs them out to the console
- Find out whether it's possible to start SQLite automatically whenever the ExpressJs app starts
Ensure you document any gotchas with the node module along the way, and note down any questions or uncertainties - as these will need to be turned into requirements in the next step.
Software projects often have technical design documents, so it'd be good practice to try writing one of your own. As a general rule, a good design document would have enough detail about what will change and how, that one of your colleagues could go off and implement the feature themselves. Adapting an existing project you've worked on to use a database will be a great introduction to this.
The existing Cat API requirements won't change, and serve as a good template. Stackoverflow also has a very detailed template, which you could adapt to your needs (by deleting all the unnecessary sections).
Ask lots of questions about the design spec structure along the way, and then get me to review it - then you'll implement the change :)
@skwong25