Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8354689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:37:44+00:00 2026-06-09T09:37:44+00:00

I have a node.js app that loads a signup form when visiting localhost/user/signup: html

  • 0

I have a node.js app that loads a signup form when visiting localhost/user/signup:

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="")

but when I access the page the server console logs a 404 error getting the JavaScript files, it was working fine until only resonantly when I changed the signup page to be loaded from localhost/signup to localhost/user/signup:

app.get('/signup',user.signupForm);

to:

app.get('/user/signup',user.signupForm);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:37:47+00:00Added an answer on June 9, 2026 at 9:37 am

    From you question I assume, that you did not move the JavaScript files along, so your directory structure looks like this:

    localhost
    |- user
    |-- signup
    |- javascripts
    

    In that case, the relative paths of you JavaScript files have to be changed in order to point towards the correct files:

    script(type='text/javascript',src='../javascripts/validator.js')
    script(type='text/javascript',src='../javascripts/signupValidation.js')
    

    Remember that if you don’t use absolute paths, paths are always treated as relative to the current directory, so in your case the system is searching for the JavaScript files in localhost/user/javascripts/, which does not exist and thus results in the 404 errors!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that loads records from a binary log file and displays
I have a Node.js Express app that I'm hosting on Nodejitsu. I'm already using
I have a basic Node.js app that I am trying to get off the
We have a node.js app that uses node_msyql , a great little library for
I have a Rails app that sends requests to a Node.js app. The node.js
i have tree node in my app that was created by dynamically.when right click
I have the following express node.js app. It's using the 'redis' npm package. app.get(/test,function(req,res){
I am creating a Node.js app on Heroku and have run into an issue.
I have a module I created for a node.js app. The app also uses
I have the following node.js server-side code: var app = require('http').createServer(handler) , io =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.