Comments (5)
Same here. I need access to the underlying http server object for other purposes such as WebSocket.
from inversify-express-utils.
Any ideas?
from inversify-express-utils.
+1
Is there any way, in particular I'm looking to use InversifySocketUtils
so would be happy if there was an option to at least get the underlying https server instance.
from inversify-express-utils.
Hi All,
maybe it would be useful for you, this is how I got Http instance.
const inversifyExpressServer = new InversifyExpressServer(container);
inversifyExpressServer.setConfig((app) => {
// add body parser
app.use(
bodyParser.urlencoded({
extended: true,
}),
);
app.use(bodyParser.json());
});
let app = inversifyExpressServer.build();
const server = http.createServer(app);
server.listen(port)
As you see after build we get express app instance. This instance could be fed to http.createServer and then server.listen(port).
from inversify-express-utils.
@davx1992 's solution is corect.
app is just an express app not an http server.
from inversify-express-utils.
Related Issues (20)
- Error trying to instantiate controller in a test (Error: No matching bindings found for serviceIdentifier: Symbol(HttpContext)) HOT 1
- inversify-express-utils, support of express 4.17.1 HOT 1
- [Inversify Express Utils] Controller is Reconstructed on Every Request HOT 1
- Inversify-Express-Untils Cannot Build Multiple Servers HOT 1
- Is inversify-express-utils no longer under maintenance? HOT 1
- integrating inversify-express-utils with inversify-socket-utils
- inversify-express-utils: BaseHttpController's conflict should take an argument
- [inversify-express-utils] AuthProvider Unhandled Promise Rejection HOT 1
- [inversify-express-utils] allow to inject dependencies into middleware constructor HOT 2
- inversify-socket-io-utils - new project submission HOT 1
- Contextual injection not working with express utils decorators (inversify-express-utils) HOT 1
- [inversify-express-utils] Nesting controllers and maintaining route context HOT 2
- Passing additional data to Middleware HOT 2
- Handling singletons in creation of large plans HOT 3
- [inversify-express-utils]: Auth provider cannot rely on server-level middleware HOT 3
- [Feature Request] Add request, response, next to BaseHttpController
- Adding route config while creating server doesn't assign mount path to baseurl property of express request object
- JsonContent doesn't send correctly HOT 7
- Can not inject dependency in my CustomAuthProvider HOT 1
- Breaking changes from TypeScript update HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inversify-express-utils.