Initial commit
This commit is contained in:
53
Docker Backend/src/config/index.js
Normal file
53
Docker Backend/src/config/index.js
Normal file
@@ -0,0 +1,53 @@
|
||||
require('dotenv').config();
|
||||
const path = require('path');
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
module.exports = {
|
||||
env: process.env.NODE_ENV || 'development',
|
||||
port: parseInt(process.env.PORT, 10) || 4000,
|
||||
|
||||
scriptalizer: {
|
||||
licenseKey: process.env.SCRIPTALIZER_LICENSE_KEY,
|
||||
errFrequency: parseInt(process.env.SCRIPTALIZER_ERR_FREQUENCY, 10) || 0,
|
||||
endpoint: 'https://www.scriptalizer.co.uk/QuantumScriptalize.asmx/Scriptalize',
|
||||
fontMap: {
|
||||
tilda: 'PremiumUltra79',
|
||||
alva: 'PremiumUltra23',
|
||||
ellie: 'PremiumUltra39'
|
||||
},
|
||||
separator: '|||', // Triple pipe separator (tested and working)
|
||||
maxInputSize: 48000 // 48KB limit
|
||||
},
|
||||
|
||||
preview: {
|
||||
// No batch size limit - frontend can send any number of letters
|
||||
// Backend splits into 25-letter batches for Scriptalizer API internally
|
||||
scriptalizerBatchSize: 25
|
||||
// No cache lifetime - files are kept until manually cleaned
|
||||
// No rate limiting
|
||||
},
|
||||
|
||||
paths: {
|
||||
cache: isProduction ? '/app/cache' : path.join(__dirname, '../../cache'),
|
||||
previews: isProduction ? '/app/cache/previews' : path.join(__dirname, '../../cache/previews'),
|
||||
output: isProduction ? '/app/output' : path.join(__dirname, '../../output'),
|
||||
fonts: isProduction ? '/app/fonts' : path.join(__dirname, '../../fonts')
|
||||
},
|
||||
|
||||
cors: {
|
||||
origin: process.env.CORS_ORIGIN || '*',
|
||||
credentials: true
|
||||
},
|
||||
|
||||
auth: {
|
||||
apiToken: process.env.API_TOKEN || null
|
||||
},
|
||||
|
||||
paypal: {
|
||||
clientId: process.env.PAYPAL_CLIENT_ID || '',
|
||||
clientSecret: process.env.PAYPAL_CLIENT_SECRET || '',
|
||||
// 'sandbox' oder 'live'
|
||||
environment: process.env.PAYPAL_ENVIRONMENT || 'sandbox'
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user