import { Application } from '@feathersjs/express'; import Accounts from './accounts.service'; import Products from './products.service'; import Contractors from './contractors.service'; import Waybills from './waybills.service'; import Tranfers from './transfers.service'; import Spreadsheets from './spreadsheets.service'; import Uploads from './uploads.service'; import sortByDate from '../hooks/sortByDate'; import ignoreCaseRegex from '../hooks/ignoreCaseRegex'; export default (app: Application): void => { app.configure(Accounts); app.configure(Products); app.configure(Contractors); app.configure(Waybills); app.configure(Tranfers); app.configure(Spreadsheets); app.configure(Uploads); app.get('/ping', (req, res) => res.send('pong')); app.hooks({ before: { find: [sortByDate, ignoreCaseRegex] }, }) };