#161: Set default value for createdAt field, store zone chats into database

This commit is contained in:
2024-11-14 20:45:37 +01:00
parent 3f8f8745eb
commit 460308d555
12 changed files with 109 additions and 29 deletions

View File

@ -27,12 +27,14 @@ export class Server {
*/
constructor() {
this.app = express()
this.app.use(cors({
origin: config.CLIENT_URL,
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], // Add supported methods
allowedHeaders: ['Content-Type', 'Authorization'], // Add allowed headers
credentials: true // Enable if you're using cookies/credentials
}))
this.app.use(
cors({
origin: config.CLIENT_URL,
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], // Add supported methods
allowedHeaders: ['Content-Type', 'Authorization'], // Add allowed headers
credentials: true // Enable if you're using cookies/credentials
})
)
this.app.use(express.json())
this.app.use(express.urlencoded({ extended: true }))
this.http = httpServer(this.app)