NATAPP accesses the project started by vue-cli

Due to the epidemic, I have been silently working at home recently. Due to the needs of the project, I have to use natapp again. This thing was used two years ago, but it was not the vue-cli project that I visited before. I would like to record it here, because there are It’s a pit, I didn’t get it right after working for a long time in the morning, and I didn’t take a good rest during the lunch break. I was full of this matter and thought of two or three ideas to solve it. As a result, it was solved in the afternoon. I hereby record it

First follow the one-minute tutorial comparison, find your previous channel, ok, everything is normal, and then start your own vue-cli project

The project starts normally

 Go to my tunnel to modify the configuration

 

 Then go to start your own natapp service:

Here, there may be such an error:

 Invalid Host header

The page can be accessed, but there are only these three words in the page, you need to modify the configuration in your vue project:

Add disableHostCheck: true in vue.config.js,

 Restart natapp again to access the newly mapped address

ok, this is successful, go to the address bar and enter the mapped address to access the project and you're done

 Well, it is already accessible at this time, but the reason for the relatively large project is probably that it is very slow, so you need to wait patiently, ok is over!

Guess you like

Origin blog.csdn.net/qq_37299479/article/details/128051424