by Sai gowtham

How to change a port number in Vue App

In this tutorial, we are going to learn how to change a default port number in vue app which is created using the vue cli.

Changing port number

  1. Open the vue app in your favorite code editor.

  2. Create a new file called vue.config.js in your root directory.

  3. Add the following code, by replacing it with your port number.

vue.config.js
module.exports = {
    devServer: {
        port: 3454    }
}
  1. Now, run the app using npm run serve command, your port number is successfully changed.
 DONE  Compiled successfully in 2114ms


  App running at:
  - Local:   http://localhost:3454/
  - Network: http://192.168.43.18:3454/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

If you want to change the port number temporarily, you can add a --port option to npm run serve command.

Example:

npm run serve -- --port 2345

You can also learn about, how to change a port number in React.

Css Tutorials & Demos

How rotate an image continuously in CSS

In this demo, we are going to learn about how to rotate an image continuously using the css animations.

How to create a Instagram login Page

In this demo, i will show you how to create a instagram login page using html and css.

How to create a pulse animation in CSS

In this demo, i will show you how to create a pulse animation using css.

Creating a snowfall animation using css and JavaScript

In this demo, i will show you how to create a snow fall animation using css and JavaScript.

Top Udemy Courses

JavaScript - The Complete Guide 2021 (Beginner + Advanced)
JavaScript - The Complete Guide 2021 (Beginner + Advanced)
64,026 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
284,472 students enrolled
40 hours of video content
View Course
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
152,857 students enrolled
48.5 hours of video content
View Course