无法想到这种情况发生的任何原因,也无法在其他地方找到。 Foreman和Local主机正在加载我的bootstrap css / js就好了,但当我推送到Heroku时,它们没有被读/样式化。
doctype html
html
head
meta(name='viewport', content='width=device-width, initial-scale=1.0')
title= title
link(rel='stylesheet', href='/bootstrap/css/amelia.bootstrap.css')
link(rel='stylesheet', href='/stylesheets/style.css')
body
block content
script(src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js')
script(src='/bootstrap/js/bootstrap.min.js')
它们都在public
文件夹中是本地的,文件结构是正确的。例如:
载入:https://loc8r1989.herokuapp.com/stylesheets/style.css
不加载:https://loc8r1989.herokuapp.com/bootstrap/css/amelia.bootstrap.css
如果重要,则为package.json
:
{
"name": "Loc8R",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node bin/www"
},
"engines": {
"node": "0.10.33",
"npm": "1.4.28"
},
"dependencies": {
"body-parser": "~1.10.2",
"cookie-parser": "~1.3.3",
"debug": "~2.1.1",
"express": "~4.11.1",
"jade": "~1.9.1",
"morgan": "~1.5.1",
"serve-favicon": "~2.2.0"
}
}
这再次在本地和Foreman工作,但不在线。
谢谢!