Skip to content

neilnmartin/express-mongodb-review

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-mongodb-review

Express-MongoDB Review Workshop

npm install

start mongod + mongo shell

Exercise 1

In your server index file, build out an express server and create a start script for it in your package.json.

In your database index file, establish a connection to the mongo collection and export the connection to your server.

Exercise 2

Create a file to describe your Mongoose model. Export your schema.

Exercise 3

Specify routes in the server routes file. Build out your controller functionality in the server controller file.

Exercise 4

Create a file with some data that fits your schema, and write a function to seed that data into the database. Add this functionality as a setup script to your package.json and run it.

Exercise 5

Use an external tool such as Postman to test your database with GET, POST and DELETE requests. Check that the database is being updated with each request in your mongo shell.

About

Express-MongoDB Review Workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published