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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user