1
0
Fork 0

feat: Added strapi instance

This commit is contained in:
joostdecock 2021-08-29 11:58:04 +02:00
parent ec2ebfac50
commit 87726a333d
16 changed files with 157 additions and 0 deletions

View 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

View file

@ -0,0 +1,2 @@
HOST=0.0.0.0
PORT=1337

View file

@ -0,0 +1,3 @@
.cache
build
**/node_modules/**

27
packages/strapi/.eslintrc Normal file
View 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"]
}
}

View file

@ -0,0 +1,3 @@
# Strapi application
A quick description of your strapi application

View file

View 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),
},
},
},
});

View 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 = () => {};

View 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': () => {
//
// }
};

View file

@ -0,0 +1,5 @@
'use strict';
module.exports = async (/* ctx */) => {
// return ctx.notFound('My custom message 404');
};

View 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'),
},
},
});

View file

BIN
packages/strapi/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View 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"
}

View file

@ -0,0 +1,2 @@
User-Agent: *
Disallow: /

View file