There is some code to establish a node.js server with a html engine:
const express = require('express');
const paypal = require('paypal-rest-sdk');
var cons = require('consolidate');
var path = require('path');
const app = express();
app.engine('html', cons.swig)
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'html');
app.get('/', (req, res) => res.render('index.html'));
However in my index.html file I wanna output some PHP variables. Let's say these look as follows:
<p class="places">
<?php echo $request['places_count'].' places are left now'; ?>
</p>
Is that even possible to show php veriables inside node.js and if not, what's the best way to solve the issue?