robin*

메인 판 목록 추가

const app = require('../server');
const db = require('../db');
app.get('/board', async(req, res) => {
res.json({boards: await db.get('board').find()});
app.get('/', async(req, res) => {
res.render('boardlist', {boards: await db.get('board').find()});
})
app.get('/board/:bid', async(req, res) => {
let board = await db.get('board').findOne({name: req.params.bid});
......
<div class="list-group">
{{#each boards}}
<a href="/board/{{this.name}}" class="list-group-item list-group-item-action">{{this.title}}</a>
{{/each}}
</div>
\ No newline at end of file