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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:30:38+00:00 2026-06-14T10:30:38+00:00

I am trying to add in a subdomain with node.sj and Expressjs v3, but

  • 0

I am trying to add in a subdomain with node.sj and Expressjs v3, but I keep getting 404 cannot get / when trying to load the subdomain.

var express = require('express'),
    app = module.exports = express(),
    MongoStore = require('connect-mongodb'),
    server = require('http').createServer(app),
    fs = require('fs'),
    socket = require('./lib/sockets'),
    flash = require('./middleware/flash');

app.configure('development', function () {
    app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); 
});

app.configure('production', function () {
    app.use(express.errorHandler()); 
});

app.configure(function () {
    app.use(express.favicon(__dirname + '/public/domain.com/images/favicon.ico'));
    app.engine('.html', require('ejs').__express);
    app.set('views', __dirname + '/views/site');
    app.set('view engine', 'ejs');
    app.use(express.cookieParser());
    app.use(express.bodyParser());
    app.use(express.methodOverride());
    app.use(flash());
    app.use(app.router);
    app.use(express.vhost(app.get('manager_vhost'), require('./subdomains/Manager')));

});

server.listen(3000);
socket.listen(server, sessionStore, app);

This is what I have in my Manager file

var express = require('express'),
    manager = module.exports = express();


manager.configure(function () {
    manager.use(express.static(manager.get('base_location') + '/public/'));
    manager.engine('.html', require('ejs').__express);
    manager.set('view engine', 'ejs');
    manager.set('version', version);
});

Is there something I am doing wrong here?

  • 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-14T10:30:39+00:00Added an answer on June 14, 2026 at 10:30 am

    Where are your routes defined? Try adding in a route and see what happens

    manager.get('/', function (req, res) {
        res.render('layout', { 
            title: 'Manager '
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im new to asp.net mvc. I'm trying add new model class but it got
Trying to add a blank sample app for a rails tutorial to GitHub, but
Trying to add a class object into a List using reflection, but when invoking
I am trying add value to a mutlidimensional array but I am slightly confused
Friends, i m trying add image to my Jbutton using seticon method but it
I'm trying add vertical lines to my grid. I have found some examples but
I'm trying add data triggers to the default combobox style so each text item
I am trying add picture boxes dynamically. My code is as PictureBox picture =
Trying to add init parameter names to a list in init(ServletConfig) method. public void
Trying to add a 'box' to a form at design time, I looked up

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.