import express = require ( 'express' ) ; const path = require ( 'path' ) ; const app = express ( ) ; app . engine ( '.html' , require ( 'ejs' ) . __express ) ; app . set ( 'view engine' , 'html' ) ; app . set ( 'views' , './' ) ; app . use ( express . static ( path . join ( __dirname , 'dist' ) ) ) ; app . use ( '/indiv-doc' , async ( req , res ) => { const render = require ( './render' ) ; const content = await render . render ( req . url , req . query , '/indiv-doc' ) ; res . render ( 'dev.html' , { content , } ) ; } ) ; app . listen ( 2234 ) ; console . log ( `listening on http://localhost:2234/indiv-doc` ) ; module . exports = app ;