Node.js Generate html

前端 未结 4 2012
醉话见心
醉话见心 2020-12-02 11:17

I have created a JavaScript program which generates a list of data. Example output below:

output one 
output two 
output three 
...

I would

4条回答
  •  星月不相逢
    2020-12-02 12:14

    You can use jade + express:

    app.get('/', function (req, res) { res.render('index', { title : 'Home' } ) });
    

    above you see 'index' and an object {title : 'Home'}, 'index' is your html and the object is your data that will be rendered in your html.

提交回复
热议问题