chore: Setup objectionjs as ORM

This commit is contained in:
Faruk AYDIN
2021-10-05 18:39:28 +02:00
committed by Ali BARIN
parent 908f156a45
commit f032dea77e
5 changed files with 111 additions and 4 deletions

View File

@@ -7,10 +7,14 @@ import graphQLInstance from './helpers/graphql-instance';
import logger from './helpers/logger';
import morgan from './helpers/morgan';
import errorHandler from './helpers/error-handler'
import { Model } from 'objection';
const app = express();
const port = appConfig.port;
import knex from './config/database';
Model.knex(knex)
app.use(morgan);
app.use(express.json());
app.use(express.urlencoded({ extended: false }));