9. Working on the Web Jam Backend Repo - WebJamApps/JaMmusic GitHub Wiki
9.1 NodeJS and Express
If you ever run into an error where a node-express instance is already in use, this command works great:
killall node
9.2 Working with MongoDB
9.2.1 mLAB
More mLab info is coming soon ...
Get the credentials for mLab from [email protected] and put them into your .env file
9.2.2 MongoDB at Localhost
If desiring to run MongoDB locally for testing, then follow the installation instructions at mongodb.com
For the backend .env use the following:
Mongodb_URI=localhost
Open a Terminal, type mongo --shell
Commands to know:
show dbs - shows all databases
show collections - shows each model in the database
db.collection.find() - will find all records in the collection, for example db.books.find()
db.collection.drop() - will drop or delete all records from the collection, for example db.books.drop()