You can use app.use()
:
app
.use('/app1', require('./app1/index').app)
.use('/app2', require('./app2/index').app)
.listen(8080);
More Related Contents:
- Download a file from NodeJS Server using Express
- Make Axios send cookies in its requests automatically
- Start script missing error when running npm start
- HTTP GET Request in Node.js Express
- How to search in array of object in mongodb
- Pass variables to JavaScript in ExpressJS
- Passing variables to the next middleware using next() in Express.js
- How do I ungzip (decompress) a NodeJS request’s module gzip response body?
- socket.io.js not found
- Handling errors in express async middleware
- How can I set response header on express.js assets
- What does “./bin/www” do in Express 4.x?
- Why is PassportJS in Node not removing session on logout
- MongoDB select where in array of _id?
- res.download() not working in my case
- Difference between readFile() and readFileSync()
- What are express.json() and express.urlencoded()?
- Listen on HTTP and HTTPS for a single express app
- Read json file content with require vs fs.readFile
- Node.js POST causes [Error: socket hang up] code: ‘ECONNRESET’
- Accessing Express.js local variables in client side JavaScript
- Node.js request CERT_HAS_EXPIRED
- Handlebars: Access has been denied to resolve the property “from” because it is not an “own property” of its parent
- configure node express to serve static bower_components?
- Express: Setting content-type based on path/file?
- How to generate unique ID with node.js
- How can I use webpack with express?
- express.js – how to intercept response.send() / response.json()
- Node.js passing parameters to client via express render
- Can’t get rid of header X-Powered-By:Express