mirror of
https://github.com/sasjs/server.git
synced 2026-01-08 23:10:05 +00:00
chore(merge): Merge branch 'master' into authentication-with-jwt
This commit is contained in:
19
api/src/app.ts
Normal file
19
api/src/app.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import express from 'express'
|
||||
import morgan from 'morgan'
|
||||
import webRouter from './routes/web'
|
||||
import apiRouter from './routes/api'
|
||||
import { getWebBuildFolderPath } from './utils'
|
||||
|
||||
const app = express()
|
||||
|
||||
app.use(express.json({ limit: '50mb' }))
|
||||
app.use(morgan('tiny'))
|
||||
app.use(express.static('public'))
|
||||
|
||||
app.use('/', webRouter)
|
||||
app.use('/SASjsApi', apiRouter)
|
||||
app.use(express.json({ limit: '50mb' }))
|
||||
|
||||
app.use(express.static(getWebBuildFolderPath()))
|
||||
|
||||
export default app
|
||||
Reference in New Issue
Block a user