apal21 / Vue.js-VueRouter-multiple-subdomains

A sample Vue template to use single Vue.js application over multiple domains/subdomains.

Home Page:https://gosink.in/vue-js-how-to-handle-multiple-subdomains-on-a-single-app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle multiple subdomains using VueRouter

A simple Vue.js project which can handle multiple subdomains in a single app using VueRouter.

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

For Windows Users

  • This project uses ESLint - Airbnb, which doesn't support a file in CRLF. It only supports LF.
  • To convert this project into LF, you need Git bash or some other Linux terminal for Windows.
  • Open it and run the following commands:
  $ cd src
  $ find ./ -type f -exec dos2unix {} \;

How to use

  • To use this from subdomains locally you need to configure your hosts.
  • For detailed explanation and code refer this link

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

About

A sample Vue template to use single Vue.js application over multiple domains/subdomains.

https://gosink.in/vue-js-how-to-handle-multiple-subdomains-on-a-single-app/


Languages

Language:JavaScript 82.7%Language:Vue 9.4%Language:HTML 7.9%