4
1
Fork 0

Add dynamic accounts

This commit is contained in:
Simon Giesel 2018-02-20 01:07:10 +01:00
parent 80a10450bc
commit 1fa7f71b0b
2 changed files with 21 additions and 9 deletions

View file

@ -30,10 +30,20 @@ app.get('/', function(req, res){
data.forEach(el => {
console.log(el.class)
})
res.render('index', {
instances: [
{
name: 'Test',
level: 1000
},
{
name: 'Tes2t',
level: 10200
// res.sendFile(__dirname + '/views/index.html');
res.render('index')
}
]
})
} else console.error('HTTP ERROR ' + response.statusCode + '')
});
})

View file

@ -12,6 +12,7 @@
<th>Class</th>
<th>Exp</th>
</tr>
{{#instances}}
<tr>
<td>{{name}}</td>
<td>{{level}}<img src="assets/Arrow.png" align="right"></td>
@ -19,5 +20,6 @@
<td>{{class}}</td>
<td>{{exp}}</td>
</tr>
{{/instances}}
</table>