如何在config / production.json中指向前端目录

时间:2017-09-05 19:23:10

标签: reactjs feathersjs

我正在更改公共目录的配置以指向create-react-app生成的构建目录。该应用程序显示但API不再可用。 我做错了什么? 有没有办法改变api路径到/ api?

    //dafault.json
    {
      "host": "localhost",
      "port": 3030,
      "public": "../public/",
      "paginate": {
        "default": 10,
        "max": 50
      },
      "authentication": {
        "secret": "FAKE secret",
        "strategies": [
          "jwt",
          "local"
        ],
        "path": "/authentication",
        "service": "users",
        "jwt": {
          "header": {
            "type": "access"
          },
          "audience": "https://yourdomain.com",
          "subject": "anonymous",
          "issuer": "feathers",
          "algorithm": "HS256",
          "expiresIn": "1d"
        },
        "local": {
          "entity": "user",
          "usernameField": "email",
          "passwordField": "password"
        }
      },
      "mongodb": "mongodb://localhost:27017/scm"
    }

    //production.json
    {
        "host": "localhost",
        "port": "PORT",
        "public": "../src-front/build/"
    }

0 个答案:

没有答案