Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
320 views
in Technique[技术] by (71.8m points)

javascript - 将我的Nuxt.js主机从IP更改为域名(Change my Nuxt.js host from IP to domain name)

I started a small project using Nuxt.js on my own ubuntu VPS and I would like to change my host from the IP to the domain name, because right now when I do npm run dev i get the IP:PORT.

(我在自己的ubuntu VPS上使用Nuxt.js开始了一个小项目,我想将主机从IP更改为域名,因为现在当我执行npm run dev我会得到IP:PORT.)

How can I replace IP:PORT by my domain name directly like that mydomain.com By the way my domain name already point on my VPS server.

(我该如何直接用域名替换IP:PORT就像mydomain.com一样用我的域名已经指向我的VPS服务器。)

This is my nuxt.config.js file :

(这是我的nuxt.config.js文件:)

server: {
  port: 8000, // default: 3000
  host: '0.0.0.0' // default: localhost
}
  ask by Amine Bouhaddi translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...