...
app.use(express.static(__dirname)) // вот эту строчку добавьте
app.use(bodyParser.urlencoded({ extended: false }));
...
openssl genrsa -out localhost-key.pem 2048
openssl req -new -x509 -sha256 -key localhost-key.pem -out localhost.pem -days 365
When bundling with Webpack for the backend - you usually don't want to bundle its node_modules dependencies. This library creates an externals function that ignores node_modules when bundling in Webpack.
module.exports = {
data: {
isDev: process.env.NODE_ENV === 'development'
}
}
<div {% if isDev %} class="debug" {% endif %} ></div>
<!-- or -->
<div class="{{ 'debug' if isDev }}"></div>