This lab is worth 50 points:
db.js
to the models
folder.
Be sure to include the code for monitoring connections and
graceful shutdown, as well as the test to determine which
environment to use.courses.js
to define the schema for the app
(similar to the text example, this will be based on the controller
and views created in Unit 8). Ease of grading
(5) To show that you have followed all the steps, you will create a set of scripts. Commands should be done from the root directory of your application.
Development mode. Show that development mode attaches to your local database, and that the disconnect commands are working properly.
nodemon > devEnv.txt
. Stop the process (e.g., with
Ctrl-C, I had to do this twice). This saves the console output
to the file devEnv.txt
.
devEnv.txt
) should include a message such as:
Mongoose connected to mongodb://localhost/[YOUR_DB_NAME]
Mongoose disconnected
Production mode. Show that production mode attaches to your a remote database, and that the disconnect commands are working properly.
nodemon > prodEnv.txt
. Stop the process.Mongoose connected to mongodb://[YOUR_MONGOLAB_URI]
Heroku. Show that your app has been pushed to Heroku.
heroku open
heroku logs > HerokuLogs.txt
2017-12-08T00:35:18.552476+00:00 app[web.1]: Mongoose connected to mongodb://[YOUR_MONGOLAB_URI]
Zip all three .txt files, along with db.js
and courses.js
- the model, not the controller! - and submit for grading.