Questions tagged [express-vhost]
26 questions
1
vote
0 answers
Vhost undefined on my app hosted on Heroku
I've just set up an express app on Heroku. I'd like multiple subdomains of my domain to point to my Heroku app (ex : name1.mydomain.com, name2.mydomain.com, ...). As there's no specific app for each of these domain, I'd like to be able to know…

Hugo
- 856
- 1
- 10
- 30
1
vote
3 answers
Nodejs - How to prevent loss when node crashes?
I have an express app where users can dynamically creates subdomains which proxy sites.
Users can potentially create thousands of unique proxies, but if the app errors & crashes or restarts then this data is lost.
var app = require('express')();
var…

Orane
- 2,223
- 1
- 20
- 33
1
vote
1 answer
Nodejs - Dynamic express subdomains with vhost
Id like to dynamically create subdomains for different proxies, like so:
var app = require('express')();
var proxy = require('express-http-proxy');
var vhost = require('vhost');
app.get('/make', function (req, res) {
…

Orane
- 2,223
- 1
- 20
- 33
1
vote
1 answer
Sharing sessions between domain and subdomain
I'm a little more then stuck at the moment. Been spending the better part of 3 days trying to figure out this little issue which I'm hoping is just a simple mistake.
The issue at hand is I cannot get sessions to share between example.com and…

athammer
- 159
- 1
- 14
0
votes
1 answer
How to create a middle layer for two different servers running independently in node.js
I am trying to implement a node.js layer between two servers which will help in redirecting to the respective server on a route/url change, provided both the servers are inside one folder.
What I wanted to achieve:
If I hit localhost:8000/app1 -->…

Vish
- 142
- 1
- 8
0
votes
1 answer
'argument hostname required' vhost
Having a weird issue with express vhost inside AWS. Every time I deploy I get an error in my EB log saying:
TypeError: argument hostname is required
at vhost (/var/app/current/node_modules/vhost/index.js:39:11)
at Object.…

BitShift
- 977
- 2
- 9
- 28
0
votes
1 answer
subdomain base database connectivity (nodejs + express)
I have single repository of project and have multiple databases for different clients.
Following types of database naming and URL to connectivity that I am using to connect database based on access URL:
Client's Database
shreyas_db…

Shreyas P
- 9
- 3
0
votes
0 answers
hosting simple express app with hello world on apache server
var express = require('express')
let app = express();
app.get('/',(req,res)=>{
res.send('Hello world')
})
app.listen(3000, () => console.log('Server running on http://localhost:3000/'));
above is the simple app i want it to host on…

Rohit Kumar
- 21
- 4
0
votes
1 answer
Nodejs - Disable or destroy vhost subdomains/proxies
I have the follow code which dynamically proxies a website to a subdomain.
var app = require('express')();
var proxy = require('express-http-proxy');
var vhost = require('vhost');
app.get('/make', function (req, res) {
…

Orane
- 2,223
- 1
- 20
- 33
0
votes
1 answer
Node.js : Using sitemaps for virtual hosts (vhost)
I'm a beginner with node.js.
Currently I'm using node.js + express + vhost to host different domains like http://example1.com, http://example2.io etc.
How can I provide a different sitemap for each domain (http://example1.com/sitemap.xml ,…

Jean DuPont
- 411
- 7
- 22
0
votes
1 answer
Nodejs Express unwanted behavior: getting two different http requests replied in a unique answer
Here is the code:
FILE: server.js
var express = require('express'),
app = express(),
useragent = require('express-useragent'),
compression = require('compression'),
vhost = require('vhost');
app.use(vhost("blabla.com",…

user1774309
- 447
- 1
- 3
- 14