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.

35 lines
593 B

import fastify from 'fastify'
import dotenv from 'dotenv'
import path from 'path'
// getting .env
dotenv.config({ path: path.join(path.resolve(), '/../../.env') })
// create server
const server = fastify()
/**
* add plugins
*
*/
import liquid from './plugins/liquid.js'
server.register(liquid)
/**
* add routes
*
*/
import authHttp from './http/api/auth.js'
import indexHttp from './http/index.js'
import staticHttp from './http/static.js'
server
.register(authHttp, {
'prefix': '/api'
})
.register(indexHttp)
.register(staticHttp)
export default server