// nuxt.config.js
ssr: true,
target: 'server'
nuxt generate
server {
listen 443 ssl;
server_name ~^(www\.)?(?<lang>en|ru)\.site\.com;
location / {
proxy_pass http://localhost:3000/$lang;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
server {
listen 443 ssl;
server_name site.com;
rewrite ^(.*)$ http://en.site.com;
}
export default {
install(Vue, options) {
Vue.prototype.$myMethod = function (methodOptions) {
console.log('hello from my plugin')
},
Vue.prototype.getPost = () => {
console.log("jnfjknfdjkngkjdfngjkndfjg");
}
}
}
import MyPlugin from './helper'
Vue.use(MyPlugin)