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 8177565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:32:31+00:00 2026-06-06T23:32:31+00:00

i just started using nodester as nodejs application paas and i stepped into a

  • 0

i just started using nodester as nodejs application paas and i stepped into a couple of problems.

Let me clarify that my local machine runs node 0.7 while on nodester i’m using node 0.6.17

The following code is inside my server.js file, executed by the platform:

app.get('/static', function(req,res) {
  res.sendfile('views/myFile.html',function(error){
    if(err)
      res.send('An error has occurred');
  });
});
app.get('/', function(req,res){
  res.render('index.jade');
});

The rest of the code is the code generated by Express.js
in particular the configuration is

app.set('views', __dirname + '/views');
  app.use(express.static(__dirname + '/public'));
  app.set('view engine', 'jade');
  app.set('view options', {layout: 'layout.jade'}); //added by me but with no results

If i run this configuration in my local machine, everything works fine, the ‘/’ route, perfectly sends the index.jade view inside the proper layout.jade view.
The ‘/static’ route, sends index.html without problems.

But if i run this code on nodester (after editing package.json and asking for node 0.6)
i get different results:

  1. The ‘/’ route doesn’t render the layout.jade, but only index.jade. This is pretty weird, since i just edited the layout.jade file, generated by express!

  2. The ‘/static’ route just throws an error, that i can catch with the callback. So the html file is not sent.

Where am i wrong? i am probably missing something.. any ideas?

  • 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-06T23:32:34+00:00Added an answer on June 6, 2026 at 11:32 pm

    Answer for 2

    In nodester the node process might be running from a different directory making process.cwd() not equal to your app’s root directory.

    To solve this issue, use the following code

    app.get('/static', function(req,res) {
      res.sendfile(__dirname + '/views/myFile.html',function(error){
        if(err)
          res.send('An error has occurred');
      });
    });
    

    Answer for 1

    Similiar problem as above. So, please check and tell me.

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

Sidebar

Related Questions

I just started using Solrnet in my application only to discover that using the
I just started using gApps scripts and I have run into two problems with
I just started using git with github. I followed their instructions and ran into
I just started using Caliburn.Micro and I've noticed in all the examples that the
I just started using Maven and I read that plugins are additional components that
Just started using Java (for Android, if that matters) and all I want is
I just started using the latest build of ffmpeg into which ffmpeg-mt has been
Just started using fadein/fadeout - it's functioning but with problems. I have a set
I just started using Coderush and found some stuff that I used to have
I just started using the WPF WebBrowser that is included in Net 3.5 SP1.

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.