Add dynamic accounts
This commit is contained in:
parent
80a10450bc
commit
1fa7f71b0b
2 changed files with 21 additions and 9 deletions
18
index.js
18
index.js
|
@ -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 + '')
|
||||
});
|
||||
})
|
||||
|
|
|
@ -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>
|
||||
|
|
Reference in a new issue