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.sendFile(__dirname + '/views/index.html');
res.render('index')
res.render('index', {
instances: [
{
name: 'Test',
level: 1000
},
{
name: 'Tes2t',
level: 10200
}
]
})
} else console.error('HTTP ERROR ' + response.statusCode + '')
});
})

View file

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