Image for post
Image for post
Get coding!

How to Setup a Node Project With a Vue Frontend in 5 minutes

Andy Hartnett
Oct 22 · 2 min read

When I have an idea that strikes, I want to start building as fast as possible. I use the MEVN stack (Mongo, Express, Vue, Node) when I want to standup a project quickly. Here is how I setup these projects in 5 minutes or less.

Open the terminal

Navigate to wherever you store your projects

This sets up the entire scaffold that you need for “server/client”

Next setup the server

Initialize the node project

Install the dependencies

And open up the server directory in your favorite editor:

In package.json, update the scripts section so we can run the server using npm run dev and npm run start

Add your server code to the index.js file:

Finally setup the client

Install axios on the client

Open up the client directory in your favorite editor and edit the src/main.js file

And you’re done. To call the api from any componenet in Vue just use api such as:

Get out there and build something!

While you’re here. Give me a follow on twitter!

https://twitter.com/andyhartnett12

Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Sign up for Best Stories

By Dev Genius

The best stories sent monthly to your email. Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Andy Hartnett

Written by

Programmer — Writer. @andyhartnett12

Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Andy Hartnett

Written by

Programmer — Writer. @andyhartnett12

Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store