Hi, I am new to this group so I hope posting this question is okay? If not, 
please let me know the correct protocol.


I have a node app that works perfectly on Heroku but not on A2Hosting nor 
on FastComet:

It is an express app using ejs.

The Routes are simply as follows:
//Root Route
app.get("/", function(req, res){ 
  res.render("index"); 
}); 

app.get("/contact", function(req, res){ 
    // res.send("You have reached the contact page"); 
    res.render("contact"); 
}); 

app.get("/about", function(req, res){ 
    // res.send("You have reached the contact page"); 
    res.render("about"); 
});


I keep getting an error 503 on the contact and about routes but the initial 
index.ejs works just fine:

My .htaccess file is simply the following:
RewriteEngine On
RewriteRule ^$ http://127.0.0.1:49555/ [P,L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ http://127.0.0.1:49555/$1 [P,L] 
DirectoryIndex views/index.ejs


The App works perfectly on my localhost as well as on Heroku. I have tried 
everything and cannot seem to come right with my links to contact.ejs and 
about.ejs.

The tags are simply:
<nav>
   <li><a href="/about">Samples</a> </li> 
   <li><a href="/contact">Contact</a> </li> 
</nav>


The Index.ejs, contact.ejs and about.ejs are in a views folder.


This is the actual site on A2Hosting: http://www.digital-alchemy.solutions

And This is the site on Heroku which works perfectly: 
https://desolate-lowlands-92367.herokuapp.com


It really is a small app.


Any Help would be seriously appreciated.

Kind regards

Wayne

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/b68033bc-9a26-45b2-a18f-08e768d9c4b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to