我訪問本地主機/用戶/註冊時加載註冊表單使Node.js應用:404包括JavaScript
html
head
script(type='text/javascript',src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js')
script(type='text/javascript',src='javascripts/validator.js')
script(type='text/javascript',src='javascripts/signupValidation.js')
body
p(id='error', style='display:none;')#{error}
form(id='signup',method='post',action='/signup')
label(for='firstname') Firstname
input(type='text', name='firstname')
label(for='lastname') Lastname
input(type='text', name='lastname')
label Username
input(type='text', name='username')
label Password
input(type='password', name='password')
label Password again
input(type='password', name='password2')
label Email
input(type='email', name='email')
input(type='submit',value='Sign up', onclick="")
但是當我訪問網頁服務器控制檯登錄一個404錯誤獲取的JavaScript文件,它工作正常,直到只有當共振改變我的註冊頁面從localhost/signup
加載到localhost/user/signup
:
app.get('/signup',user.signupForm);
到:
app.get('/user/signup',user.signupForm);
您應該準確描述您更改的配置以及現在的樣子。 – 2012-08-10 09:30:12
好的,更新問題 – gilbertbw 2012-08-10 09:30:59