-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 28ff10f
Showing
11 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = ({ env }) => ({ | ||
auth: { | ||
secret: env('ADMIN_JWT_SECRET'), | ||
}, | ||
apiToken: { | ||
salt: env('API_TOKEN_SALT'), | ||
}, | ||
transfer: { | ||
token: { | ||
salt: env('TRANSFER_TOKEN_SALT'), | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = { | ||
rest: { | ||
defaultLimit: 25, | ||
maxLimit: 100, | ||
withCount: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const path_1 = __importDefault(require("path")); | ||
exports.default = ({ env }) => { | ||
const client = env('DATABASE_CLIENT', 'sqlite'); | ||
const connections = { | ||
mysql: { | ||
connection: { | ||
connectionString: env('DATABASE_URL'), | ||
host: env('DATABASE_HOST', 'localhost'), | ||
port: env.int('DATABASE_PORT', 3306), | ||
database: env('DATABASE_NAME', 'strapi'), | ||
user: env('DATABASE_USERNAME', 'strapi'), | ||
password: env('DATABASE_PASSWORD', 'strapi'), | ||
ssl: env.bool('DATABASE_SSL', false) && { | ||
key: env('DATABASE_SSL_KEY', undefined), | ||
cert: env('DATABASE_SSL_CERT', undefined), | ||
ca: env('DATABASE_SSL_CA', undefined), | ||
capath: env('DATABASE_SSL_CAPATH', undefined), | ||
cipher: env('DATABASE_SSL_CIPHER', undefined), | ||
rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true), | ||
}, | ||
}, | ||
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, | ||
}, | ||
mysql2: { | ||
connection: { | ||
host: env('DATABASE_HOST', 'localhost'), | ||
port: env.int('DATABASE_PORT', 3306), | ||
database: env('DATABASE_NAME', 'strapi'), | ||
user: env('DATABASE_USERNAME', 'strapi'), | ||
password: env('DATABASE_PASSWORD', 'strapi'), | ||
ssl: env.bool('DATABASE_SSL', false) && { | ||
key: env('DATABASE_SSL_KEY', undefined), | ||
cert: env('DATABASE_SSL_CERT', undefined), | ||
ca: env('DATABASE_SSL_CA', undefined), | ||
capath: env('DATABASE_SSL_CAPATH', undefined), | ||
cipher: env('DATABASE_SSL_CIPHER', undefined), | ||
rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true), | ||
}, | ||
}, | ||
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, | ||
}, | ||
postgres: { | ||
connection: { | ||
connectionString: env('DATABASE_URL'), | ||
host: env('DATABASE_HOST', 'localhost'), | ||
port: env.int('DATABASE_PORT', 5432), | ||
database: env('DATABASE_NAME', 'strapi'), | ||
user: env('DATABASE_USERNAME', 'strapi'), | ||
password: env('DATABASE_PASSWORD', 'strapi'), | ||
ssl: env.bool('DATABASE_SSL', false) && { | ||
key: env('DATABASE_SSL_KEY', undefined), | ||
cert: env('DATABASE_SSL_CERT', undefined), | ||
ca: env('DATABASE_SSL_CA', undefined), | ||
capath: env('DATABASE_SSL_CAPATH', undefined), | ||
cipher: env('DATABASE_SSL_CIPHER', undefined), | ||
rejectUnauthorized: env.bool('DATABASE_SSL_REJECT_UNAUTHORIZED', true), | ||
}, | ||
schema: env('DATABASE_SCHEMA', 'public'), | ||
}, | ||
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, | ||
}, | ||
sqlite: { | ||
connection: { | ||
filename: path_1.default.join(__dirname, '..', '..', env('DATABASE_FILENAME', '.tmp/data.db')), | ||
}, | ||
useNullAsDefault: true, | ||
}, | ||
}; | ||
return { | ||
connection: { | ||
client, | ||
...connections[client], | ||
acquireConnectionTimeout: env.int('DATABASE_CONNECTION_TIMEOUT', 60000), | ||
}, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = [ | ||
'strapi::errors', | ||
'strapi::security', | ||
'strapi::cors', | ||
'strapi::poweredBy', | ||
'strapi::logger', | ||
'strapi::query', | ||
'strapi::body', | ||
'strapi::session', | ||
'strapi::favicon', | ||
'strapi::public', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = ({ env }) => ({ | ||
host: env('HOST', '0.0.0.0'), | ||
port: env.int('PORT', 1337), | ||
app: { | ||
keys: env.array('APP_KEYS'), | ||
}, | ||
webhooks: { | ||
populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false), | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"kind": "collectionType", | ||
"collectionName": "notes_apps", | ||
"info": { | ||
"singularName": "notes-app", | ||
"pluralName": "notes-apps", | ||
"displayName": "NotesApp", | ||
"description": "" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": {}, | ||
"attributes": { | ||
"note_title": { | ||
"type": "string" | ||
}, | ||
"note_desc": { | ||
"type": "string" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"use strict"; | ||
/** | ||
* notes-app controller | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const strapi_1 = require("@strapi/strapi"); | ||
exports.default = strapi_1.factories.createCoreController('api::notes-app.notes-app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"use strict"; | ||
/** | ||
* notes-app router | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const strapi_1 = require("@strapi/strapi"); | ||
// | ||
exports.default = strapi_1.factories.createCoreRouter('api::notes-app.notes-app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"use strict"; | ||
/** | ||
* notes-app service | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const strapi_1 = require("@strapi/strapi"); | ||
exports.default = strapi_1.factories.createCoreService('api::notes-app.notes-app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = { | ||
/** | ||
* An asynchronous register function that runs before | ||
* your application is initialized. | ||
* | ||
* This gives you an opportunity to extend code. | ||
*/ | ||
register( /*{ strapi }*/) { }, | ||
/** | ||
* An asynchronous bootstrap function that runs before | ||
* your application gets started. | ||
* | ||
* This gives you an opportunity to set up your data model, | ||
* run jobs, or perform some special logic. | ||
*/ | ||
bootstrap( /*{ strapi }*/) { }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":"5.2.2"} |