Exercise N1: NodeJS with Express and MongoDB on Heroku
Due March 15, start of class, GROUP WORK
Use WebStorm with Git and Heroku and create a NodeJS+Express project. Setup free acount on Heroku and follow all of the steps of getting started and setup a MongoDB database table as shown here (SEE NOTES BELOW) and code and view ejs page to support the url /db as demoed here (note: read the ejs file to see what the fields should be of your database table). Demonstrate the application working in a web browser and show heroku console illustrating the app is deployed and a 3rd database console which shows the data in the database from app working. Also turn in as directed in deliverables below.
SPECIAL Note: for MongoDB with Heroku
>> p.s. I do know MLab is shut down since Nov. 2020 so you now need to investigate what are your options (remember you are responsible for any and all accounts you create)
- SUGGESTED OPTION: Using the credits you get on Github student developer pack for MongoDB Atlas
- Another option that is not free is using the new plugin OpenRocket for MongoDB support. Please use this if it is free. https://devcenter.heroku.com/articles/ormongo
- ALSO read this article on NodeJS and provisioning a DB on Heroku and various options
IMPORTANT: Since creating some of the screenshots shown above the version of MongoDB and the corresponding drivers have some changes in the code --how you call it from Node JS-without it the code wont work.
|
Deliverable
(TURN IN EVERYONE IN GROUP : URL to a NEW gitHub responsitory to BB->Exercises->Ex N1.
It should contain ALL the CODE and a wiki with the following page names.
-
App Runnning: screenshots of application running ( url /db )
DataBase Console: screenshots of data in database admin console