1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 11:24:35 +00:00

chore: add configuration for static resources and rendering views

This commit is contained in:
2021-10-07 17:18:51 +00:00
parent 3ffa168c8b
commit bd92b8b983

View File

@@ -1,10 +1,14 @@
import express from 'express'
import indexRouter from './routes'
import path from 'path'
const app = express()
app.use(express.json({ limit: '50mb' }))
app.set('views', path.join(__dirname, 'views'))
app.set('view engine', 'pug')
app.use(express.static(path.join(__dirname, '..', 'public')))
app.use('/', indexRouter)
export default app