proxy_pass http://127.0.0.1:3000/;
нужен чтоб убрать /back/server {
listen 80;
server_name site.localhost;
location /back/ {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_pass http://127.0.0.1:3000/;
}
}
const express = require('express');
const app = express();
const cors = require('cors');
app.use(cors());
app.post('/', (req, res) => {
res.json({ 1: 1 });
});
app.listen(3000);
(async () => {
const res = await fetch('http://site.localhost/back/', { method: 'POST' }).then(r => r.json())
console.log(res)
})();
`
<div class="home-item__points">
${arr.map((item) => `
// Начало foreach
<div class="home-point">
<ul>
<li><span>MOW – HKT</span><span>10:45 – 08:00</span>
</li>
<li><span>В пути</span><span>21ч 15м</span>
</li>
<li><span>1 пересадка</span><span>HKG</span>
</li>
</ul>
</div>
// Конец foreach
`).join('')}
</div>
`
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "Operator, Misc",
"scope": ["punctuation.definition.tag.begin.html", "punctuation.definition.tag.end.html"],
"settings": {
"foreground": "#fff"
}
}
]
}
output: {
filename: 'file-[contenthash].js',
chunkFilename: 'chunk-[contenthash].js',
}