Answer the question
In order to leave comments, you need to log in
What tools are there to implement a modular application in node.js?
How to write an application on node.js (express.js, yo) so that its individual parts can be connected / disconnected / installed / removed (even from different repositories)? Some kind of plugin support.
Answer the question
In order to leave comments, you need to log in
Approximately like this:
var express = require('express')
, mysubapp = require('./lib/mysubapp/index'); // путь к другому express-приложению
var app = express();
// маунтим
app.use(mysubapp);
Application server https://www.npmjs.org/package/impress
You can connect several applications, open everything on one or several ports, routes between applications by domain name in the request url, and inside each application all logic is divided into separate handlers, look examples. But it's not an express compatible thing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question