i was asked to build a simple application that gets some data from a database and return it for that i used express as backend tool and angular as a frontend . Now i am asked to deploy it on a live server that uses windows IIS , For that i used IISnode ,i've installed it and it works fine , however when i access my app it gives me this error : "(node:7016) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues" .
the probleme is i did not use that function anywhere in my application .
this my app.js code : `
var express = require('express');
var indexRouter = require('./routes/index');
var app = express();
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "http://localhost:4200");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use('/', indexRouter);
// error handler
app.use(function(err, req, res, next) {
// set locals, only providing error in development
res.locals.message = err.message;
res.locals.error = req.app.get('env') === 'development' ? err : {};
// render the error page
res.status(err.status || 500);
res.render('error');
});
module.exports = app;`
this is web.config file :
<configuration>
<system.webServer>
<!-- indicates that the hello.js file is a node.js application
to be handled by the iisnode module -->
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>
<!-- use URL rewriting to redirect the entire branch of the URL namespace
to hello.js node.js application; for example, the following URLs will
all be handled by hello.js:
http://localhost/node/express/myapp/foo
http://localhost/node/express/myapp/bar
-->
<rewrite>
<rules>
<rule name="myapp">
<match url="/*" />
<action type="Rewrite" url="app.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Can anyone tells me what i am doing wrong ??