- secondcommit: delete unnecessary test files
This commit is contained in:
parent
407717d4b5
commit
44688ac806
80
db.config.js
80
db.config.js
|
@ -1,80 +0,0 @@
|
|||
import Sequelize from "sequelize";
|
||||
import * as dotenv from "dotenv"; // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
|
||||
dotenv.config();
|
||||
|
||||
// module.exports = {
|
||||
// HOST: "localhost",
|
||||
// USER: "tethys_admin",
|
||||
// PASSWORD: "tethys_admin007",
|
||||
// DB: "tethys",
|
||||
// dialect: "postgres",
|
||||
// pool: {
|
||||
// max: 5,
|
||||
// min: 0,
|
||||
// acquire: 30000,
|
||||
// idle: 10000
|
||||
// }
|
||||
// };
|
||||
|
||||
// const pg = require('pg');
|
||||
// pg.types.setTypeParser(1114, (str) => new Date((str.split(' ').join('T'))+'Z'));
|
||||
|
||||
|
||||
const dbSchema = process.env.DB_SCHEMA;
|
||||
const dbName = process.env.DB_NAME;
|
||||
const dbUser = process.env.DB_USER;
|
||||
const dbPassword = process.env.DB_PASSWORD;
|
||||
const dbHost = process.env.DB_HOST;
|
||||
// const dbDriver = process.env.DB_DRIVER; // as Dialect
|
||||
|
||||
const sequelizeConnection = new Sequelize(
|
||||
dbName,
|
||||
dbUser,
|
||||
dbPassword,
|
||||
{
|
||||
schema: dbSchema,
|
||||
host: dbHost || "localhost",
|
||||
port: process.env.DB_PORT || 5432,
|
||||
dialect: "postgres",
|
||||
dialectOptions: {
|
||||
ssl: process.env.DB_SSL == "true",
|
||||
},
|
||||
pool: {
|
||||
max: 10,
|
||||
min: 0,
|
||||
acquire: 30000,
|
||||
idle: 10000,
|
||||
},
|
||||
logging: false,
|
||||
dialectOptions: {
|
||||
useUTC: false, //for reading from database
|
||||
dateStrings: true,
|
||||
typeCast: true
|
||||
},
|
||||
timezone: '+02:00' //for writing to database
|
||||
// host: "localhost",
|
||||
// dialect: 'postgres',
|
||||
// logging: false
|
||||
}
|
||||
);
|
||||
|
||||
sequelizeConnection
|
||||
.authenticate()
|
||||
.then(() => {
|
||||
console.log("Connection has been established successfully.");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error("Unable to connect to the database:", err);
|
||||
});
|
||||
export default sequelizeConnection;
|
||||
// export default sequelizeConnection;
|
||||
|
||||
// // relations
|
||||
// Dataset.hasMany(Title, {
|
||||
// as: "titles",
|
||||
// foreignKey: "document_id"
|
||||
// });
|
||||
// Title.belongsTo(Dataset, {
|
||||
// foreignKey: "document_id",
|
||||
// as: "dataset",
|
||||
// });
|
13
notes.txt
13
notes.txt
|
@ -93,3 +93,16 @@ npm install --save redis
|
|||
|
||||
npm i sprintf-js --save
|
||||
npm i --save-dev @types/sprintf-js
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
======================================== git =============================================================
|
||||
git config --global user.name
|
||||
git config --global user.email
|
||||
|
||||
git remote add origin https://gitea.geologie.ac.at/geolba/tethys.api.git
|
||||
git push -o repo.private=false --set-upstream origin master
|
|
@ -335,10 +335,10 @@ export class OaiController {
|
|||
*/
|
||||
protected async handleListIdentifiers(oaiRequest: OaiParameter) {
|
||||
// if ("resumptionToken" in oaiRequest) {
|
||||
if (!this.tokenWorker) {
|
||||
this.tokenWorker = new TokenWorker(86400);
|
||||
}
|
||||
!this.tokenWorker.Connected && (await this.tokenWorker.connect());
|
||||
if (!this.tokenWorker) {
|
||||
this.tokenWorker = new TokenWorker(86400);
|
||||
}
|
||||
!this.tokenWorker.Connected && (await this.tokenWorker.connect());
|
||||
|
||||
//$maxIdentifier = 5; //$this->_configuration->getMaxListIdentifiers();
|
||||
const maxIdentifier = this.configuration.maxListIds; //->getMaxListIdentifiers();
|
||||
|
|
Loading…
Reference in New Issue
Block a user