|
|
@@ -68,13 +68,14 @@ const VatSchema = require('./schema/vat.js');
|
|
|
//const Logger = require('@keystonejs/logger').logger('test');
|
|
|
|
|
|
|
|
|
-const initialiseData = require('./initial-data');
|
|
|
+// ??? const initialiseData = require('./initial-data');
|
|
|
|
|
|
const { KnexAdapter: Adapter } = require('@keystonejs/adapter-knex');
|
|
|
|
|
|
const PROJECT_NAME = 'SchuStock';
|
|
|
const adapterConfig = { knexOptions: {
|
|
|
- connection: 'postgresql://kdev_postgres:utnQ67pt74bVw6aB@postgres:5432/kdev_postgres',
|
|
|
+ //connection: 'postgresql://kdev_postgres:utnQ67pt74bVw6aB@postgres:5432/kdev_postgres',
|
|
|
+ connection: 'postgresql://kdev_postgres:utnQ67pt74bVw6aB@54.37.131.206:5432/kdev_postgres',
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -87,8 +88,9 @@ const { Wysiwyg } = require('@keystonejs/fields-wysiwyg-tinymce')
|
|
|
|
|
|
const keystone = new Keystone({
|
|
|
adapter: new Adapter(adapterConfig),
|
|
|
+
|
|
|
//onConnect: process.env.CREATE_TABLES !== 'true' && initialiseData,
|
|
|
- onConnect: initialiseData,
|
|
|
+/// ???? onConnect: initialiseData,
|
|
|
//secureCookies: false,
|
|
|
/*
|
|
|
cookie: {
|
|
|
@@ -101,11 +103,15 @@ const keystone = new Keystone({
|
|
|
cookieSecret: 'dupa23',
|
|
|
name: 'SchuStock',
|
|
|
brand: 'Jubiler Schubert',
|
|
|
+// port: 3000,
|
|
|
+// host: '0.0.0.0',
|
|
|
//sessionStore: new FileSessionStore({ }),
|
|
|
});
|
|
|
|
|
|
//keystone.set('signin logo', ['https://jubilerschubert.pl/wp-content/uploads/schubert_logo.svg', 180, 42]);
|
|
|
|
|
|
+//keystone.set('host', '0.0.0.0');
|
|
|
+
|
|
|
// Access control functions
|
|
|
const userIsAdmin = ({ authentication: { item: user } }) => Boolean(user && user.isAdmin);
|
|
|
const userOwnsItem = ({ authentication: { item: user } }) => {
|
|
|
@@ -275,4 +281,4 @@ module.exports = {
|
|
|
/*configureExpress: app => {
|
|
|
app.set('trust proxy', true);
|
|
|
}*/
|
|
|
-};
|
|
|
+};
|