For my FINAL Hacktoberfest issue I decided I wanted to keep working on the previous web application from issue 4. As I previously mentioned, no database has been set up to store the information of the user as well as data from the survey. I checked the issues and saw that no one claimed this issue and decided to proceed with it. The project owner wanted it to be done with MongoDB or mySql. I have used MongoDB 2 – 3 times for my assignments in my web class so I was familiar with how to do the set up.
I had mongoDB installed on my computer already and then started with using npm install mongoDB into this nodeJS application.
After that I was a little rocky to start as I forgot to to do the basic set up. In my web class there are usually detailed steps on how to set up the database, what commands to use, where to add the variables and in which folders.
For this project, I was given no guidance on where to start so I open up an old project to start comparing similarities. I also recalled my previous professor had put the steps up on his github so I followed his documentation for this open source project. I initially was trying to set up a MongoDB database locally, but decided to use a cloud MongoDB database via mLab instead because I found it must easier to implement. I created a new deployment on mLab and added a user. I ran a command to connect to the database which is similar to this (but with my credentials).
mongorestore -h ds######.mlab.com:##### -d <dbname> -u <dbuser> -p <dbpassword>
I then set up the database to work with the project by adding a mongoDB connection string with my credentials to the project.
I submitted this for my FINAL pull request.
Even though I have finished with Hacktoberfest I plan on working on this project more to see it to its completion as I became interested in to along the way. I would like to do some styling, improve code for the survey forms and write handlers to capture the user data from the survey into the database. Since I have used my credentials to set up the database in mLab I may need to work closely with the project developer to transfer over the database.