当前位置:网站首页>base address: environment variable
base address: environment variable
2022-08-04 03:04:00 【I must win this time】
One. Function
Environment variables: set different variables for different environments
2. Development environment
development
Process:
1. Create a file in the root directory.env.development
2. Set the variables of the corresponding environment in the file
Interface base address; VUE_APP_begins
VUE_APP_URL='Development environment interface base address'
Three. Production environment
production
1. Create a file in the root directory. env.production
2. Set the variables of the corresponding environment in the file
Interface base address; VUE_APP_begins
VUE_APP_URL='production environment interface base address'
Four. Use
process.env.VUE_APP_URL can get the defined value
npm run server development: process.env.VUE_APP_URL===aaa
npm run build production:process.env.VUE_APP_URL===bbb
V. Practical application


In the development environment:

Let's see if we can identify:

Identified.
This allows us to determine a base address in both production and development environments.
边栏推荐
猜你喜欢

董明珠直播时冷脸离场,员工频犯低级错误,自家产品没人能弄明白

织梦内核电动伸缩门卷闸门门业公司网站模板 带手机版【站长亲测】

小程序+新零售,玩转行业新玩法!

小程序:扫码打开参数解析

Pine Script | How to display and typeset a plot switch?

基地址:环境变量

6口全千兆二层网管型工业以太网交换机千兆2光4电光纤自愈ERPS环网交换机

2千兆光+6千兆电导轨式网管型工业级以太网交换机支持X-Ring冗余环网一键环网交换机

new Date converts strings into date formats Compatible with IE, how ie8 converts strings into date formats through new Date, how to replace strings in js, and explain the replace() method in detail

2022年最新海南建筑八大员(材料员)模拟考试试题及答案
随机推荐
[Study Notes Dish Dog Learning C] Dynamic Memory Management
Why use Selenium for automated testing
数据安全峰会2022 | 美创DSM获颁“数据安全产品能力验证计划”评测证书
QNX Hypervisor 2.2用户手册]10.2 vdev 8259
6-port full Gigabit Layer 2 network managed industrial Ethernet switch Gigabit 2 optical 4 electrical fiber self-healing ERPS ring network switch
flinkcdc 消费 mysql binlog 没有 sqltype=delete 的数据是什么原
【医保科普】维护医保基金安全,我们可以这样做
2 Gigabit Optical + 6 Gigabit Electric Rail Type Managed Industrial Ethernet Switch Supports X-Ring Redundant Ring One-key Ring Switch
SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropri
FPGA解析B码----连载3
【原创】启动Win10自带的XPS/OXPS阅读器
织梦内核电动伸缩门卷闸门门业公司网站模板 带手机版【站长亲测】
6口全千兆二层网管型工业以太网交换机千兆2光4电光纤自愈ERPS环网交换机
【指针内功修炼】深度剖析指针笔试题(三)
ant-design的Select组件采用自定义后缀图标(suffixIcon属性)时,点击该自定义图标没有反应,不会展示下拉菜单的问题
sql注入一般流程(附例题)
2022年最新海南建筑八大员(材料员)模拟考试试题及答案
怎样提高网络数据安全性
MRS: Alluxio的使用介绍
出海季,互联网出海锦囊之本地化