You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
353 B

'use strict'
const fastify = require('fastify')()
fastify.register(require('./index'), {
engine: {
ejs: require('ejs')
}
})
fastify.get('/', (req, reply) => {
reply.view('/templates/index.ejs', { text: 'text' })
})
fastify.listen(3000, err => {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
})