feat: Added strapi instance
This commit is contained in:
parent
ec2ebfac50
commit
87726a333d
16 changed files with 157 additions and 0 deletions
16
packages/strapi/.editorconfig
Normal file
16
packages/strapi/.editorconfig
Normal file
|
@ -0,0 +1,16 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{package.json,*.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
2
packages/strapi/.env.example
Normal file
2
packages/strapi/.env.example
Normal file
|
@ -0,0 +1,2 @@
|
|||
HOST=0.0.0.0
|
||||
PORT=1337
|
3
packages/strapi/.eslintignore
Normal file
3
packages/strapi/.eslintignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
.cache
|
||||
build
|
||||
**/node_modules/**
|
27
packages/strapi/.eslintrc
Normal file
27
packages/strapi/.eslintrc
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"parser": "babel-eslint",
|
||||
"extends": "eslint:recommended",
|
||||
"env": {
|
||||
"commonjs": true,
|
||||
"es6": true,
|
||||
"node": true,
|
||||
"browser": false
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"experimentalObjectRestSpread": true,
|
||||
"jsx": false
|
||||
},
|
||||
"sourceType": "module"
|
||||
},
|
||||
"globals": {
|
||||
"strapi": true
|
||||
},
|
||||
"rules": {
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"no-console": 0,
|
||||
"quotes": ["error", "single"],
|
||||
"semi": ["error", "always"]
|
||||
}
|
||||
}
|
3
packages/strapi/README.md
Normal file
3
packages/strapi/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Strapi application
|
||||
|
||||
A quick description of your strapi application
|
0
packages/strapi/api/.gitkeep
Normal file
0
packages/strapi/api/.gitkeep
Normal file
20
packages/strapi/config/database.js
Normal file
20
packages/strapi/config/database.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
module.exports = ({ env }) => ({
|
||||
defaultConnection: 'default',
|
||||
connections: {
|
||||
default: {
|
||||
connector: 'mongoose',
|
||||
settings: {
|
||||
host: env('DATABASE_HOST', '127.0.0.1'),
|
||||
srv: env.bool('DATABASE_SRV', false),
|
||||
port: env.int('DATABASE_PORT', 27017),
|
||||
database: env('DATABASE_NAME', 'strapi'),
|
||||
username: env('DATABASE_USERNAME', null),
|
||||
password: env('DATABASE_PASSWORD', null),
|
||||
},
|
||||
options: {
|
||||
authenticationDatabase: env('AUTHENTICATION_DATABASE', null),
|
||||
ssl: env.bool('DATABASE_SSL', false),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
13
packages/strapi/config/functions/bootstrap.js
vendored
Normal file
13
packages/strapi/config/functions/bootstrap.js
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* See more details here: https://strapi.io/documentation/developer-docs/latest/setup-deployment-guides/configurations.html#bootstrap
|
||||
*/
|
||||
|
||||
module.exports = () => {};
|
21
packages/strapi/config/functions/cron.js
Normal file
21
packages/strapi/config/functions/cron.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* Cron config that gives you an opportunity
|
||||
* to run scheduled jobs.
|
||||
*
|
||||
* The cron format consists of:
|
||||
* [SECOND (optional)] [MINUTE] [HOUR] [DAY OF MONTH] [MONTH OF YEAR] [DAY OF WEEK]
|
||||
*
|
||||
* See more details here: https://strapi.io/documentation/developer-docs/latest/setup-deployment-guides/configurations.html#cron-tasks
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Simple example.
|
||||
* Every monday at 1am.
|
||||
*/
|
||||
// '0 1 * * 1': () => {
|
||||
//
|
||||
// }
|
||||
};
|
5
packages/strapi/config/functions/responses/404.js
Normal file
5
packages/strapi/config/functions/responses/404.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = async (/* ctx */) => {
|
||||
// return ctx.notFound('My custom message 404');
|
||||
};
|
9
packages/strapi/config/server.js
Normal file
9
packages/strapi/config/server.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
module.exports = ({ env }) => ({
|
||||
host: env('HOST', '0.0.0.0'),
|
||||
port: env.int('PORT', 1337),
|
||||
admin: {
|
||||
auth: {
|
||||
secret: env('ADMIN_JWT_SECRET', 'you could hardcode a fallback here'),
|
||||
},
|
||||
},
|
||||
});
|
0
packages/strapi/extensions/.gitkeep
Normal file
0
packages/strapi/extensions/.gitkeep
Normal file
BIN
packages/strapi/favicon.ico
Normal file
BIN
packages/strapi/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
36
packages/strapi/package.json
Normal file
36
packages/strapi/package.json
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "strapi",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"description": "FreeSewing's Strapi instance",
|
||||
"scripts": {
|
||||
"develop": "strapi develop",
|
||||
"start": "strapi start",
|
||||
"build": "strapi build",
|
||||
"strapi": "strapi"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"dependencies": {
|
||||
"strapi": "3.6.5",
|
||||
"strapi-admin": "3.6.5",
|
||||
"strapi-utils": "3.6.5",
|
||||
"strapi-plugin-content-type-builder": "3.6.5",
|
||||
"strapi-plugin-content-manager": "3.6.5",
|
||||
"strapi-plugin-users-permissions": "3.6.5",
|
||||
"strapi-plugin-email": "3.6.5",
|
||||
"strapi-plugin-upload": "3.6.5",
|
||||
"strapi-plugin-i18n": "3.6.5",
|
||||
"strapi-connector-mongoose": "3.6.5"
|
||||
},
|
||||
"author": {
|
||||
"name": "Joost De Cock <joost@joost.at>"
|
||||
},
|
||||
"strapi": {
|
||||
"uuid": "ebdf450e-ca5d-4963-a198-748ccbd07370"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.16.0 <=14.x.x",
|
||||
"npm": "^6.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
2
packages/strapi/public/robots.txt
Normal file
2
packages/strapi/public/robots.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
User-Agent: *
|
||||
Disallow: /
|
0
packages/strapi/public/uploads/.gitkeep
Normal file
0
packages/strapi/public/uploads/.gitkeep
Normal file
Loading…
Add table
Add a link
Reference in a new issue