mirror of
https://github.com/sasjs/server.git
synced 2026-01-15 09:50:06 +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 express from 'express'
|
||||||
import indexRouter from './routes'
|
import indexRouter from './routes'
|
||||||
|
import path from 'path'
|
||||||
const app = express()
|
const app = express()
|
||||||
|
|
||||||
app.use(express.json({ limit: '50mb' }))
|
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)
|
app.use('/', indexRouter)
|
||||||
|
|
||||||
export default app
|
export default app
|
||||||
|
|||||||
Reference in New Issue
Block a user