Mongoose JS Tutorial - 3 - Build a CRUD App (1)

Pubblicato il: 29 gennaio 2016
sul canale di: JsWiz
64,474
430

Full Course: https://goo.gl/rT7o2k

Build a mini app using Express and Mongoose.

Learn How to us the find method to query for results.

In the last video we learned a little bit Mongoose - including how to create Schemas and set up a connection.

In this lecture we'll start using mongoose along with express to query objects and display results.

We're going to be building a mini app for this project. So start by navigating into a folder where you want your app to be. We'll start off with npm init to create a package.json file for us.

Now we'll install express, mongoose and body-parser

Next, we'll build out the BookSchema

setup app.js and server + test server

try connecting to mongoose for fail
now connect to mongod

Now lets add some books using our shell, connecting to our db and inserting them

I want to fetch all the books using Express. So we'll be using app.get in our app.js file to retrieve all the books we added as well as individual books.

We'll get into more detail on how to use express in later videos and I also have a free Express Fundamentals course that covers the basics you can check out.

Repo for the code:
https://github.com/jakblak/MongooseJS...


In questa pagina del sito puoi guardare il video online Mongoose JS Tutorial - 3 - Build a CRUD App (1) della durata di ore minuti seconda in buona qualità , che l'utente ha caricato JsWiz 29 gennaio 2016, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 64,474 volte e gli è piaciuto 430 spettatori. Buona visione!