mirror of
https://gitlab.com/Alamantus/Readlebee.git
synced 2025-07-06 08:04:16 +02:00
16 lines
No EOL
463 B
JavaScript
16 lines
No EOL
463 B
JavaScript
async function routes(fastify, options) {
|
|
fastify.get('/', async (request, reply) => {
|
|
// return { hello: 'world' }
|
|
reply.view('home.hbs', { text: 'test' });
|
|
});
|
|
|
|
// fastify.get('/search/:id', async function (request, reply) {
|
|
// const result = await collection.findOne({ id: request.params.id })
|
|
// if (result.value === null) {
|
|
// throw new Error('Invalid value')
|
|
// }
|
|
// return result.value
|
|
// })
|
|
}
|
|
|
|
module.exports = routes |