Initial Commit

This commit is contained in:
Sebastian Seedorf
2022-01-30 13:59:20 +01:00
commit b79abaeba9
25 changed files with 31310 additions and 0 deletions

5
config/admin.js Normal file
View File

@@ -0,0 +1,5 @@
module.exports = ({ env }) => ({
auth: {
secret: env('ADMIN_JWT_SECRET', '1788c16dbca0d54e6990d8dce6a2cf3b'),
},
});

7
config/api.js Normal file
View File

@@ -0,0 +1,7 @@
module.exports = {
rest: {
defaultLimit: 25,
maxLimit: 100,
withCount: true,
},
};

29
config/database.js Normal file
View File

@@ -0,0 +1,29 @@
const path = require('path');
const sqlDb = (env, client) => ({
host: env('DATABASE_HOST', '127.0.0.1'),
port: env.int('DATABASE_PORT', client === 'postgres' ? 5432 : 3306),
database: env('DATABASE_NAME', 'strapi'),
user: env('DATABASE_USERNAME', 'strapi'),
password: env('DATABASE_PASSWORD', 'strapi'),
schema: client === 'postgres' ? env('DATABASE_SCHEMA', 'public') : undefined,
ssl: {
rejectUnauthorized: env.bool('DATABASE_SSL_SELF', false), // For self-signed certificates
}
})
const sqlLite = (env) => ({
filename: path.join(__dirname, '..', env('DATABASE_FILENAME', '.tmp/data.db')),
})
module.exports = ({ env }) => {
const client = env('DATABASE_CLIENT', 'sqlite')
return ({
connection: {
client,
connection: client === 'sqlite' ? sqlLite(env) : sqlDb(env, client),
useNullAsDefault: true,
debug: env('NODE_ENV', 'development') === 'development'
},
});
};

12
config/middlewares.js Normal file
View File

@@ -0,0 +1,12 @@
module.exports = [
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
'strapi::favicon',
'strapi::public',
];

8
config/server.js Normal file
View File

@@ -0,0 +1,8 @@
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 3000),
url: env('URL', ''),
app: {
keys: env.array('APP_KEYS'),
},
});