当前位置: 首页 > news >正文

外贸网站的推广技巧有哪些服装设计图

外贸网站的推广技巧有哪些,服装设计图,建设网站改版,人才网站开发方案Next.js的默认访问端口是3000。有时环境需要更改。 方法1 通过环境变量 此方法不能改变端口#xff0c;看方法2 点击查看官方文档 Next.js will automatically expand variables that use $ to reference other variables e.g. $VARIABLE inside of your .env* files. This …Next.js的默认访问端口是3000。有时环境需要更改。 方法1 通过环境变量 此方法不能改变端口看方法2 点击查看官方文档 Next.js will automatically expand variables that use $ to reference other variables e.g. $VARIABLE inside of your .env* files. This allows you to reference other secrets. 翻译Next.js 将自动展开使用 $ 引用其他变量的变量例如在您的 .env* 文件中的 $VARIABLE。这使您能够引用其他密钥。 意思是说Next.js会加载.env*文件中的变量。注意*是统配符也就是.env开头的文件中的变量都会加载。 官方文档还说 Default Environment Variables In general only one .env.local file is needed. However, sometimes you might want to add some defaults for the development (next dev) or production (next start) environment. Next.js allows you to set defaults in .env (all environments), .env.development (development environment), and .env.production (production environment). .env.local always overrides the defaults set. Good to know: .env, .env.development, and .env.production files should be included in your repository as they define defaults. .env*.local should be added to .gitignore, as those files are intended to be ignored. .env.local is where secrets can be stored. 翻译 默认环境变量 通常只需要一个 .env.local 文件。然而有时您可能希望为开发next dev或生产next start环境添加一些默认值。 Next.js 允许您在 .env所有环境、.env.development开发环境和 .env.production生产环境中设置默认值。 .env.local 总是覆盖设置的默认值。 需要注意的是.env、.env.development 和 .env.production 文件应包含在您的存储库中因为它们定义了默认值。.env*.local 应该添加到 .gitignore 中因为这些文件应该被忽略。.env.local 是用于存储机密信息的地方。 再看官方文档 Environment Variable Load Order Environment variables are looked up in the following places, in order, stopping once the variable is found. process.env.env.$(NODE_ENV).local.env.local (Not checked when NODE_ENV is test.).env.$(NODE_ENV).env For example, if NODE_ENV is development and you define a variable in both .env.development.local and .env, the value in .env.development.local will be used. Good to know: The allowed values for NODE_ENV are production, development and test. 翻译 环境变量加载顺序 环境变量按照以下顺序查找一旦找到变量就停止。 process.env.env.$(NODE_ENV).local.env.local当 NODE_ENV 为 test 时不会被检查env.$(NODE_ENV)env 例如如果 NODE_ENV 为 development并且您在 .env.development.local 和 .env 中都定义了一个变量那么将使用 .env.development.local 中的值。 需要知道的是NODE_ENV 允许的值为 production、development 和 test。 举例 .env.local文件中写 PORT8088方法2 命令行 官方文档 Production next start starts the application in production mode. The application should be compiled with next build first. The application will start at http://localhost:3000 by default. The default port can be changed with -p, like so: 生产环境 next start 以生产模式启动应用程序。首先应用程序应该使用 next build 进行编译。 应用程序默认将在 http://localhost:3000 上启动。默认端口可以使用 -p 参数进行更改例如 npx next start -p 4000Or using the PORT environment variable: 或者使用 PORT 环境变量 PORT4000 npx next startGood to know: -PORT cannot be set in .env as booting up the HTTP server happens before any other code is initialized. next start cannot be used with output: ‘standalone’ or output: ‘export’. 需要知道的是 PORT 不能在 .env 中设置因为启动 HTTP 服务器会在初始化任何其他代码之前发生。 next start 不能与 output: ‘standalone’ 或 output: ‘export’ 一起使用。 一般是写在package.json文件中例如 { ....scripts: {dev: PORT3001 next dev, #开发端口是3001start: next start -p 3002, #生成端口是3002}, ... }
http://www.pierceye.com/news/941719/

相关文章:

  • 网站建设风险管理计划长沙公司网站模板制作方案
  • wordpress p上海做seo的公司
  • 网站统计分析注册公司步骤和所需材料
  • 网站开发的好处和弊端客户管理系统简称
  • 网站开发提供图片加载速度wordpress速度
  • 购物网站如何备案wordpress首页自定义
  • 企业手机网站建设提升用户体验的三个点无极领域付费网站
  • 网站设计常州网站开发年度总结
  • 免费注册网站网址做网站大概要
  • 注册网站会不会有问题做网站建设的注意事项
  • 小吃培训网站源码淮南市招标投标信息网
  • 做网站申请多少类商标网站开发的案例分析模板
  • 怎么进网站后台管理系统在线二维码制作生成器
  • seo网站关键词优化多少钱陕西省建设厅网站官网
  • 仿xss网站搭建建设网站费用吗
  • 钓鱼网页在线生成网站网站建设肆金手指排名7
  • idc网站备案家具网站建设方案
  • 互联网做网站怎么赚钱WordPress副标题不显示
  • 好的网站域名网站运营推广怎做
  • 巴适网站建设wordpress上传与安装包
  • 网站备案不关站wordpress网
  • 中国佛山手机网站建设十大互联网公司排名
  • 手把手指导做网站wordpress 熊掌号插件
  • 宁波网站建设方案报价湖州企业做网站
  • 优化 导航网站百度官网网站首页
  • 各大网站大全河北网站建设seo优化制作设计
  • 做照片的网站前端开发和后端开发
  • 谁能低价做网站支付接口泰州企业自助建站系统
  • 徐州 网站建设辽阳建设网站
  • PHP MySQL 网站开发实例单页应用网站