express.static没有呈现我附加到html内容的CSS文件,我正在使用Ubuntu

时间:2019-02-04 11:14:05

标签: node.js express

this is my code express.static方法无法从公共目录呈现CSS文件,而我正在使用ubuntu。 但是HTML文件完全没有CSS即可显示。

1 个答案:

答案 0 :(得分:0)

用这段代码替换您的express.static行

    "@ptomasroos/react-native-multi-slider": "^1.0.0",
    "moment": "^2.22.2",
    "native-base": "^2.7.2",
    "prop-types": "latest",
    "proxy-polyfill": "^0.3.0",
    "react": "16.3.1",
    "react-native": "~0.55.2",
    "react-native-animatable": "^1.3.0",
    "react-native-background-fetch": "^2.4.3",
    "react-native-collapsible": "^0.13.0",
    "react-native-device-info": "^0.21.5",
    "react-native-elements": "^0.19.1",
    "react-native-fast-image": "^5.0.3",
    "react-native-flip-toggle-button": "^1.0.5",
    "react-native-image-progress": "^1.1.1",
    "react-native-image-resizer": "^1.0.0",
    "react-native-linear-gradient": "^2.4.0",
    "react-native-localization": "^2.0.2",
    "react-native-mail": "^3.0.6",
    "react-native-material-textfield": "^0.12.0",
    "react-native-navigation": "^2.0.2425",
    "react-native-offline": "^3.11.0",
    "react-native-progress": "^3.5.0",
    "react-native-queue": "^1.2.1",
    "react-native-secure-key-store": "^2.0.0",
    "react-native-shared-group-preferences": "^1.1.15",
    "react-native-vector-icons": "^4.6.0",
    "react-native-version-check": "^3.0.0-rc.5",
    "react-native-wheel-picker": "^1.2.0",
    "react-redux": "^5.0.7",
    "realm": "^2.17.0",
    "redux": "^4.0.0",
    "redux-persist": "^5.10.0",
    "redux-saga": "^0.16.0",
    "redux-thunk": "^2.3.0",
    "typescript": "^2.9.2"