This PR adds 2 main points of functionality for IEEN:
It implements MongoDB into the application and allows the Express server to interact with it through a connection pool (set to a size of 10) that is established when the server starts. This is what allows us to efficiently handle signup and login requests in order to persist user information and authenticate users based on the credentials entered. A connection pool is used here so as not to create a new client for every request that needs to access the database; while this may not be a huge efficiency boost right now, when we implement authentication into the database, this will save us a lot of time with pre-authenticating connections that are ready to be used.
It also wires up the Login and Signup components on the client-side in order to effectively proxy requests through to the Express server whenever a user wants to create an account or log in. These requests are made using the fetch API in order to prevent having to bring in external dependencies and graduate the learning curve.
Overall, while there is still more work to be done with authentication and user session maintenance, this PR is a big step in developing a more robust account creation and authentication process. The next step after this will be to implement some kind of session persistence mechanism (most likely through the use of JSON Web Tokens) in order to ensure that the user has not modified their browser storage mechanisms in order to gain access to someone else's account. More details and implementation to follow on this.
This PR adds 2 main points of functionality for IEEN:
It implements MongoDB into the application and allows the Express server to interact with it through a connection pool (set to a size of 10) that is established when the server starts. This is what allows us to efficiently handle signup and login requests in order to persist user information and authenticate users based on the credentials entered. A connection pool is used here so as not to create a new client for every request that needs to access the database; while this may not be a huge efficiency boost right now, when we implement authentication into the database, this will save us a lot of time with pre-authenticating connections that are ready to be used.
It also wires up the Login and Signup components on the client-side in order to effectively proxy requests through to the Express server whenever a user wants to create an account or log in. These requests are made using the
fetch
API in order to prevent having to bring in external dependencies and graduate the learning curve.Overall, while there is still more work to be done with authentication and user session maintenance, this PR is a big step in developing a more robust account creation and authentication process. The next step after this will be to implement some kind of session persistence mechanism (most likely through the use of JSON Web Tokens) in order to ensure that the user has not modified their browser storage mechanisms in order to gain access to someone else's account. More details and implementation to follow on this.