如何停止Mamp Pro覆盖localhost:3000?

时间:2019-01-08 01:40:06

标签: node.js npm mamp mamp-pro

我正在尝试使用mamp pro在本地为我工作的现有节点网站。第一位开发人员使用了非专业版的mamp,对他来说效果很好。但是,当我在“ npm start”之后访问http://localhost:3000/时,会得到mamp pro默认的“虚拟主机已成功设置”页面。有什么方法可以防止mamp pro取代localhost或什至只是那个端口吗? (我尝试了建议使用herehere的解决方案,但它只是将其再次重定向到Mamp的默认页面。)Webpack.config设置在这里:

proxy: [
  {
    context: [
      '**',
      '!/*.js',
      '!/*.css',
      '!/__webpack_hmr',
      '!/*.hot-update.js',
      '!/*.hot-update.json',
    ],
    options: {
      target: 'http://example.local:8888/',
      autoRewrite: true,
      // Review docs before setting these
      // changeOrigin: true,
      // logLevel: 'error'
    },
  },
],

},

0 个答案:

没有答案
相关问题