import * as recordTypes from '@/record-types'
import * as pageTypes from '@/page-types'
import * as fieldTypes from '@/field-types'
import * as handlers from '@/handlers'
import * as storageAdapters from '@/lib/storage-adapter'
import * as fileAdapters from '@/lib/file-adapter'
import * as mailAdapters from '@/lib/mail-adapter'
export default () => ({
appName: 'Create Next Startup',
appDescription: 'Create Next Startup',
domainName: "createnextstartup.com",
recordTypes,
pageTypes,
fieldTypes,
handlers,
storageAdapters: [
storageAdapters.mongodb({
id: 'mongodb', // default
modes: ['live'],
uri: process.env.MONGODB_URI || 'mongodb://cns:cns@cns-mongo',
})
],
fileAdapters: [
// amazon example
fileAdapters.s3({
id: 's3', // default
mode: ['live', 'test'],
accessKeyId: process.env.S3_BUCKET_ACCESS_KEY_ID,
secretAccessKey: process.env.S3_BUCKET_SECRET_ACCESS_KEY,
name: process.env.S3_BUCKET_NAME ||'bucket-name',
endpoint: process.env.S3_BUCKET_ENDPOINT || 'bucket-name.s3.amazonaws.com',
cdn: process.env.S3_BUCKET_CDN 'https://cdn-id.cloudfront.net',
}),
// digital ocean spaces example
fileAdapters.s3({
id: 's3', // default
mode: ['live', 'test'],
accessKeyId: process.env.S3_BUCKET_ACCESS_KEY_ID,
secretAccessKey: process.env.S3_BUCKET_SECRET_ACCESS_KEY,
name: process.env.S3_BUCKET_NAME || 'bucket-name',
endpoint: process.env.S3_BUCKET_ENDPOINT || 'ams3.digitaloceanspaces.com',
cdn: process.env.S3_BUCKET_CDN || 'https://cdn.createnextstartup.com',
}),
fileAdapters.fs({
id: 'fs', // default
mode: ['live', 'test'],
uploadPath: '/public/uploads'
})
],
mailAdapters: [
mailAdapters.mailgun({
id: 'mailgun', // default
subdomain: "mg",
fromNoReply: `Create Next Startup <noreply@mg.createnextstartup.com>`,
fromAdmin: `Olivier at Create Next Startup <hello@mg.createnextstartup.com>`,
supportEmail: "hello@mg.createnextstartup.com",
forwardRepliesTo: "hello@createnextstartup.com",
})
]
})