Author -  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 2023 (Beginner + Advanced)
JavaScript - The Complete Guide 2023 (Beginner + Advanced)
116,648 students enrolled
52 hours of video content
$14.99 FROM UDEMY
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
631,582 students enrolled
49 hours of video content
$24.99 FROM UDEMY
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
203,937 students enrolled
31.5 hours of video content
$14.99 FROM UDEMY