我正在更改公共目录的配置以指向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/"
}