SitePoint
  • Blog
  • Discord
  • Forum
  • Library
  • Login
Join Premium

Build a Basic CRUD App with Vue.js, Node and MongoDB

Close
  1. Preface
    • Build a Basic CRUD App with Vue.js, Node and MongoDB
    • Notice of Rights
    • Notice of Liability
    • Trademark Notice
    • About SitePoint
  2. 1Build a Basic CRUD App with Vue.js, Node and MongoDB
    • Install the Tooling
    • Creating the Node Back End
    • Creating the Vue Front End
    • Taking it Further
    • Conclusion

You don't have any bookmarks for this book yet.

Build a Basic CRUD App with Vue.js, Node and MongoDB

Postman - a successful PUT request

Destroy

To delete a word, just change the method to DELETE and press Send. Zap! The word should be gone and your collection should be empty. You can test that this is indeed the case, either using Compass, or by selecting the original request to get all words from the left hand pane in Postman and firing that off again. This time it should return an empty array.

And that’s it. We’re done with our back end. Don’t forget that you can find all of the code for this guide on GitHub, so if something didn’t work as expected, try cloning the repo and running that.

Creating the Vue Front End

Previously we created our back end in a server folder. We’ll create the front-end part of the app in a front-end folder. This separation of concerns means that it would be easier to swap out the front end if we ever decided we wanted to use a framework other than Vue.

Let’s get to it.

Basic Setup

We’ll use Vue CLI to scaffold the project:

End of PreviewSign Up to unlock the rest of this title.

Community Questions