当前位置:网站首页>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.
边栏推荐
- 第08章 索引的创建与设计原则【2.索引及调优篇】【MySQL高级】
- 单片机C语言->的用法,和意思
- Polygon zkEVM网络节点
- MySQL高级-读写分离-分库分表
- kingbaseES V8R2/R3 表在指定表空间,为何显示为默认表空间?
- TOML configuration file format, YAML's top contender
- flinkcdc 消费 mysql binlog 没有 sqltype=delete 的数据是什么原
- Countdown to 2 days, the "New Infrastructure of Cultural Digital Strategy and Ecological Construction of Cultural Art Chain" will kick off soon
- STM32-遥感数据处理
- Rongyun "Audio and Video Architecture Practice" technical session [complete PPT included]
猜你喜欢
随机推荐
返回字符串中的最大回文数
安装postgis时报找不到“POSTGIS_VERSION”这个函数
单片机C语言->的用法,和意思
LeetCode每日一题(2285. Maximum Total Importance of Roads)
Development of Taurus. MVC WebAPI introductory tutorial 1: download environment configuration and operation framework (including series directory).
STM8S-----选项字节
FPGA解析B码----连载3
[Medical Insurance Science] To maintain the safety of medical insurance funds, we can do this
What is the source of flinkcdc consuming mysql binlog data without sqltype=delete
Zabbix设置邮件告警+企业微信告警
系统太多,多账号互通如何实现?
esp8266-01s刷固件步骤
云开发旅游打卡广场微信小程序源码(含视频教程)
How to read the resources files in the directory path?
Ant - the design of the Select component using a custom icon (suffixIcon attribute) suffixes, click on the custom ICONS have no reaction, will not display the drop-down menu
逻辑漏洞----其他类型
【原创】启动Win10自带的XPS/OXPS阅读器
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
sqoop ETL tool
MySQL高级-读写分离-分库分表









