const bodyParser = require('body-parser')
const cors = require('cors')
const formData = require('express-form-data')
const session = require('express-session')
const lastOnline = require('./lastOnline')
module.exports = (app) => {
  app.use(cors()) // develop
  app.use(formData.parse())
  app.use(bodyParser.json())
  app.use(bodyParser.urlencoded({ extended: true }))
  app.use(session({
    secret: 'your_secret_key', // کلید مخفی برای امنیت جلسات
    resave: false,
    saveUninitialized: false
  }))
  app.use(lastOnline)
}
