Vue.js + Node.js + Express + MySQL example: Build a full-stack CRUD Application

In this tutorial, I will show you how to build full-stack (Vue.js + Node.js + Express + MySQL) example with a CRUD Application. The back-end server uses Node.js + Express for REST APIs, front-end side is a Vue client with Vue Router and axios.

More Practice: Node.js Express + Vue.js: JWT Authentication & Authorization example

Vue.js + Node.js + Express + MySQL example Overview

We will build a full-stack Tutorial Application in that:

  • Tutorial has id, title, description, published status.
  • User can create, retrieve, update, delete Tutorials.
  • There is a search box for finding Tutorials by title.

Here are screenshots of the example.

– Add an object:


– Show all objects:


– Click on Edit button to update an object:


On this Page, you can:

  • change status to Published/Pending using Publish/UnPublished button
  • remove the object from MySQL Database using Delete button
  • update this object’s details on Database with Update button

– Search objects by field ‘title’:


Full-stack CRUD App Architecture

We’re gonna build the application with following architecture:


– Node.js Express exports REST APIs & interacts with MySQL Database using Sequelize ORM.
– Vue Client sends HTTP Requests and retrieves HTTP Responses using axios, consume data on the components. Vue Router is used for navigating to pages.

Node.js Express Back-end


These are APIs that Node.js Express App will export:

GETapi/tutorialsget all Tutorials
GETapi/tutorials/:idget Tutorial by id
POSTapi/tutorialsadd new Tutorial
PUTapi/tutorials/:idupdate Tutorial by id
DELETEapi/tutorials/:idremove Tutorial by id
DELETEapi/tutorialsremove all Tutorials
GETapi/tutorials?title=[kw]find all Tutorials which title contains 'kw'

Project Structure


db.config.js exports configuring parameters for MySQL connection & Sequelize.
Express web server in server.js where we configure CORS, initialize & run Express REST APIs.
– Next, we add configuration for MySQL database in models/index.js, create Sequelize data model in models/tutorial.model.js.
– Tutorial controller in controllers.
– Routes for handling all CRUD operations (including custom finder) in tutorial.routes.js.


You can find step by step to implement this Node.js Express App in the post:
Node.js Rest APIs example with Express, Sequelize & MySQL

Vue.js Front-end



– The App component is a container with router-view. It has navbar that links to routes paths.

TutorialsList component gets and displays Tutorials.
Tutorial component has form for editing Tutorial’s details based on :id.
AddTutorial component has form for submission new Tutorial.

– These Components call TutorialDataService methods which use axios to make HTTP requests and receive responses.


  • vue: 2.6.10
  • vue-router: 3.1.3
  • axios: 0.19.0

Project Structure


package.json contains 3 main modules: vue, vue-router, axios.
– There are 3 components: TutorialsList, Tutorial, AddTutorial.
router.js defines routes for each component.
http-common.js initializes axios with HTTP base Url and headers.
TutorialDataService has methods for sending HTTP requests to the Apis.
vue.config.js configures port for this Vue Client.


You can find step by step to implement this Vue App in the post:
Vue.js CRUD App with Vue Router & Axios


Now we have an overview of Vue.js + Node.js Express + MySQL example when building a full-stack CRUD App.

We also take a look at client-server architecture for REST API using Express & Sequelize ORM, as well as Vue.js project structure for building a front-end app to make HTTP requests and consume responses.

Next tutorials show you more details about how to implement the system:

If you want a Typescript version for the Vue App, it is here:
Vue Typescript CRUD Application to consume Web API example

Happy learning, see you again!

23 thoughts to “Vue.js + Node.js + Express + MySQL example: Build a full-stack CRUD Application”

  1. Thank you for this fullstack example. Please make some more tutorials about Vue.js + Node.js Express such as JWT Authentication.

  2. Thanks, thanks, THANKS! One damn week searching for a way to combine vue and node, I was going to jump off the window… finally an example that works and so smooth, I love it. JUST THANK YOU!!! I did not expect it to be 2 separate projects, interesting.

  3. First of all, thank you for this awesome post! 🙂

    I am building an application from your tutorial and now I want to list ‘Tutorials’ (found by title and author) not on the same page (this works) but on another page (another Vue component) and I don’t undestand how to do this…
    Some clue? ^^

  4. I found myself recommended this Vue + Node tutorial by my friend. You know such detailed about my trouble. You happen to be amazing! Thanks!

  5. Thank you so much!

    I got the two errors below:
    Access to XMLHttpRequest at ‘localhost:8080/api/tutorials’ from origin ‘http://localhost:8081’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
    GET localhost:8080/api/tutorials net::ERR_FAILED

    The back-end app retrieve the data as JSON when request via Postman.

  6. thanks bezkoder for the code… i wanna ask something, is this support control-cache? i mean when i deploy it on web server, is the apps support cache revalidate when i change some data? thank you

Leave a Reply

Your email address will not be published. Required fields are marked *