zoukankan      html  css  js  c++  java
  • 巧用hosts,使得脚本可以如鱼得水似的切换环境

    1、C:WindowsSystem32driversetc在这个目录下有个hosts文件,

    文件内容如下:使用线上和线下不同的地址来指向同一个域名,便可以共用同一套脚本,而执行在不同的环境中。

    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    
    # localhost name resolution is handled within DNS itself.
    #    127.0.0.1       localhost
    #    ::1             localhost
      114.55.188.77    pro.labbigdata.com
    #  192.168.1.38    pro.labbigdata.com
  • 相关阅读:
    html5图片异步上传/ 表单提交相关
    node 常用命令
    windows下 nvm下载node被墙了解决办法
    36.迷宫(广度优先搜索)
    36.迷宫(广度优先搜索)
    35.大质数
    35.大质数
    35.大质数
    35.大质数
    35.大质数
  • 原文地址:https://www.cnblogs.com/amy7758/p/5776364.html
Copyright © 2011-2022 走看看