const express = require('express'); const app = express(); const axios = require('axios'); app.set('view engine', 'pug'); app.get('/', (req, res) => { axios.get('http://localhost:6000/dolgozok') .then(resp => { res.render('index', { dolgozok: resp.data}) }); }); app.get('/addform', (req, res) => { res.render('addform'); }); app.listen(8000, () => { console.log('Hallgatózás a 8000-s porton...'); });