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.

21 lines
403 B

'use strict'
process.env.NODE_ENV = 'production'
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({ port: 3000 }, err => {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
})