当前位置:网站首页>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.
边栏推荐
- web端动效 lottie-web 使用
- Countdown to 2 days, the "New Infrastructure of Cultural Digital Strategy and Ecological Construction of Cultural Art Chain" will kick off soon
- The keytool command
- 0.1 前言
- 云开发旅游打卡广场微信小程序源码(含视频教程)
- MySQL高级-读写分离-分库分表
- How many ways do you know about communication between multiple threads?
- 函数,递归以及dom简单操作
- Simple record of Flink principle flow chart
- 织梦内核电动伸缩门卷闸门门业公司网站模板 带手机版【站长亲测】
猜你喜欢
随机推荐
Homemade bluetooth mobile app to control stm8/stm32/C51 onboard LED
In the season of going overseas, the localization of Internet tips for going overseas
力扣(LeetCode)215. 数组中的第K个最大元素(2022.08.03)
【翻译】Terraform和Kubernetes的交集
一文看懂推荐系统:召回05:矩阵补充、最近邻查找,工业界基本不用了,但是有助于理解双塔模型
基本表单验证流程
Development of Taurus. MVC WebAPI introductory tutorial 1: download environment configuration and operation framework (including series directory).
【Playwright测试教程】5分钟上手
P3384 【模板】轻重链剖分/树链剖分
Zabbix设置邮件告警+企业微信告警
6口全千兆二层网管型工业以太网交换机千兆2光4电光纤自愈ERPS环网交换机
MySQL高级-读写分离-分库分表
C# 构造函数业务场景测试项目
数据湖(二十):Flink兼容Iceberg目前不足和Iceberg与Hudi对比
Why use Selenium for automated testing
What is the source of flinkcdc consuming mysql binlog data without sqltype=delete
sudo 权限控制,简易
ant-design的Select组件采用自定义后缀图标(suffixIcon属性)时,点击该自定义图标没有反应,不会展示下拉菜单的问题
Mockito单元测试
STM8S105K4T6------串口发送和接收







