commit
a9fbac018e
31 changed files with 10461 additions and 0 deletions
@ -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 |
@ -0,0 +1,6 @@ |
|||||
|
HOST=0.0.0.0 |
||||
|
PORT=1337 |
||||
|
APP_KEYS="toBeModified1,toBeModified2" |
||||
|
API_TOKEN_SALT=tobemodified |
||||
|
ADMIN_JWT_SECRET=tobemodified |
||||
|
JWT_SECRET=tobemodified |
@ -0,0 +1,3 @@ |
|||||
|
.cache |
||||
|
build |
||||
|
**/node_modules/** |
@ -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"] |
||||
|
} |
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
############################ |
||||
|
# OS X |
||||
|
############################ |
||||
|
|
||||
|
.DS_Store |
||||
|
.AppleDouble |
||||
|
.LSOverride |
||||
|
Icon |
||||
|
.Spotlight-V100 |
||||
|
.Trashes |
||||
|
._* |
||||
|
|
||||
|
|
||||
|
############################ |
||||
|
# Linux |
||||
|
############################ |
||||
|
|
||||
|
*~ |
||||
|
|
||||
|
|
||||
|
############################ |
||||
|
# Windows |
||||
|
############################ |
||||
|
|
||||
|
Thumbs.db |
||||
|
ehthumbs.db |
||||
|
Desktop.ini |
||||
|
$RECYCLE.BIN/ |
||||
|
*.cab |
||||
|
*.msi |
||||
|
*.msm |
||||
|
*.msp |
||||
|
|
||||
|
|
||||
|
############################ |
||||
|
# Packages |
||||
|
############################ |
||||
|
|
||||
|
*.7z |
||||
|
*.csv |
||||
|
*.dat |
||||
|
*.dmg |
||||
|
*.gz |
||||
|
*.iso |
||||
|
*.jar |
||||
|
*.rar |
||||
|
*.tar |
||||
|
*.zip |
||||
|
*.com |
||||
|
*.class |
||||
|
*.dll |
||||
|
*.exe |
||||
|
*.o |
||||
|
*.seed |
||||
|
*.so |
||||
|
*.swo |
||||
|
*.swp |
||||
|
*.swn |
||||
|
*.swm |
||||
|
*.out |
||||
|
*.pid |
||||
|
|
||||
|
|
||||
|
############################ |
||||
|
# Logs and databases |
||||
|
############################ |
||||
|
|
||||
|
.tmp |
||||
|
*.log |
||||
|
*.sql |
||||
|
*.sqlite |
||||
|
*.sqlite3 |
||||
|
|
||||
|
|
||||
|
############################ |
||||
|
# Misc. |
||||
|
############################ |
||||
|
|
||||
|
*# |
||||
|
ssl |
||||
|
.idea |
||||
|
nbproject |
||||
|
public/uploads/* |
||||
|
!public/uploads/.gitkeep |
||||
|
|
||||
|
############################ |
||||
|
# Node.js |
||||
|
############################ |
||||
|
|
||||
|
lib-cov |
||||
|
lcov.info |
||||
|
pids |
||||
|
logs |
||||
|
results |
||||
|
node_modules |
||||
|
.node_history |
||||
|
|
||||
|
############################ |
||||
|
# Tests |
||||
|
############################ |
||||
|
|
||||
|
testApp |
||||
|
coverage |
||||
|
|
||||
|
############################ |
||||
|
# Strapi |
||||
|
############################ |
||||
|
|
||||
|
.env |
||||
|
license.txt |
||||
|
exports |
||||
|
*.cache |
||||
|
dist |
||||
|
build |
||||
|
.strapi-updater.json |
@ -0,0 +1,57 @@ |
|||||
|
# 🚀 Getting started with Strapi |
||||
|
|
||||
|
Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html) (CLI) which lets you scaffold and manage your project in seconds. |
||||
|
|
||||
|
### `develop` |
||||
|
|
||||
|
Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-develop) |
||||
|
|
||||
|
``` |
||||
|
npm run develop |
||||
|
# or |
||||
|
yarn develop |
||||
|
``` |
||||
|
|
||||
|
### `start` |
||||
|
|
||||
|
Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-start) |
||||
|
|
||||
|
``` |
||||
|
npm run start |
||||
|
# or |
||||
|
yarn start |
||||
|
``` |
||||
|
|
||||
|
### `build` |
||||
|
|
||||
|
Build your admin panel. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-build) |
||||
|
|
||||
|
``` |
||||
|
npm run build |
||||
|
# or |
||||
|
yarn build |
||||
|
``` |
||||
|
|
||||
|
## ⚙️ Deployment |
||||
|
|
||||
|
Strapi gives you many possible deployment options for your project. Find the one that suits you on the [deployment section of the documentation](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/deployment.html). |
||||
|
|
||||
|
## 📚 Learn more |
||||
|
|
||||
|
- [Resource center](https://strapi.io/resource-center) - Strapi resource center. |
||||
|
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation. |
||||
|
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community. |
||||
|
- [Strapi blog](https://docs.strapi.io) - Official Strapi blog containing articles made by the Strapi team and the community. |
||||
|
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements. |
||||
|
|
||||
|
Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome! |
||||
|
|
||||
|
## ✨ Community |
||||
|
|
||||
|
- [Discord](https://discord.strapi.io) - Come chat with the Strapi community including the core team. |
||||
|
- [Forum](https://forum.strapi.io/) - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members. |
||||
|
- [Awesome Strapi](https://github.com/strapi/awesome-strapi) - A curated list of awesome things related to Strapi. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub> |
@ -0,0 +1,8 @@ |
|||||
|
module.exports = ({ env }) => ({ |
||||
|
auth: { |
||||
|
secret: env('ADMIN_JWT_SECRET'), |
||||
|
}, |
||||
|
apiToken: { |
||||
|
salt: env('API_TOKEN_SALT'), |
||||
|
}, |
||||
|
}); |
@ -0,0 +1,7 @@ |
|||||
|
module.exports = { |
||||
|
rest: { |
||||
|
defaultLimit: 25, |
||||
|
maxLimit: 100, |
||||
|
withCount: true, |
||||
|
}, |
||||
|
}; |
@ -0,0 +1,11 @@ |
|||||
|
const path = require('path'); |
||||
|
|
||||
|
module.exports = ({ env }) => ({ |
||||
|
connection: { |
||||
|
client: 'sqlite', |
||||
|
connection: { |
||||
|
filename: path.join(__dirname, '..', env('DATABASE_FILENAME', '.tmp/data.db')), |
||||
|
}, |
||||
|
useNullAsDefault: true, |
||||
|
}, |
||||
|
}); |
@ -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', |
||||
|
]; |
@ -0,0 +1,7 @@ |
|||||
|
module.exports = ({ env }) => ({ |
||||
|
host: env('HOST', '0.0.0.0'), |
||||
|
port: env.int('PORT', 1337), |
||||
|
app: { |
||||
|
keys: env.array('APP_KEYS'), |
||||
|
}, |
||||
|
}); |
After Width: | Height: | Size: 497 B |
@ -0,0 +1,30 @@ |
|||||
|
{ |
||||
|
"name": "strapi-project", |
||||
|
"private": true, |
||||
|
"version": "0.1.0", |
||||
|
"description": "A Strapi application", |
||||
|
"scripts": { |
||||
|
"develop": "strapi develop", |
||||
|
"start": "strapi start", |
||||
|
"build": "strapi build", |
||||
|
"strapi": "strapi" |
||||
|
}, |
||||
|
"devDependencies": {}, |
||||
|
"dependencies": { |
||||
|
"@strapi/strapi": "4.4.6", |
||||
|
"@strapi/plugin-users-permissions": "4.4.6", |
||||
|
"@strapi/plugin-i18n": "4.4.6", |
||||
|
"better-sqlite3": "7.4.6" |
||||
|
}, |
||||
|
"author": { |
||||
|
"name": "A Strapi developer" |
||||
|
}, |
||||
|
"strapi": { |
||||
|
"uuid": "eedd051c-dfd4-4951-9172-d93b94e45fb2" |
||||
|
}, |
||||
|
"engines": { |
||||
|
"node": ">=14.19.1 <=18.x.x", |
||||
|
"npm": ">=6.0.0" |
||||
|
}, |
||||
|
"license": "MIT" |
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
# To prevent search engines from seeing the site altogether, uncomment the next two lines: |
||||
|
# User-Agent: * |
||||
|
# Disallow: / |
@ -0,0 +1,39 @@ |
|||||
|
const config = { |
||||
|
locales: [ |
||||
|
// 'ar',
|
||||
|
// 'fr',
|
||||
|
// 'cs',
|
||||
|
// 'de',
|
||||
|
// 'dk',
|
||||
|
// 'es',
|
||||
|
// 'he',
|
||||
|
// 'id',
|
||||
|
// 'it',
|
||||
|
// 'ja',
|
||||
|
// 'ko',
|
||||
|
// 'ms',
|
||||
|
// 'nl',
|
||||
|
// 'no',
|
||||
|
// 'pl',
|
||||
|
// 'pt-BR',
|
||||
|
// 'pt',
|
||||
|
// 'ru',
|
||||
|
// 'sk',
|
||||
|
// 'sv',
|
||||
|
// 'th',
|
||||
|
// 'tr',
|
||||
|
// 'uk',
|
||||
|
// 'vi',
|
||||
|
// 'zh-Hans',
|
||||
|
// 'zh',
|
||||
|
], |
||||
|
}; |
||||
|
|
||||
|
const bootstrap = (app) => { |
||||
|
console.log(app); |
||||
|
}; |
||||
|
|
||||
|
export default { |
||||
|
config, |
||||
|
bootstrap, |
||||
|
}; |
@ -0,0 +1,39 @@ |
|||||
|
const config = { |
||||
|
locales: [ |
||||
|
// 'ar',
|
||||
|
// 'fr',
|
||||
|
// 'cs',
|
||||
|
// 'de',
|
||||
|
// 'dk',
|
||||
|
// 'es',
|
||||
|
// 'he',
|
||||
|
// 'id',
|
||||
|
// 'it',
|
||||
|
// 'ja',
|
||||
|
// 'ko',
|
||||
|
// 'ms',
|
||||
|
// 'nl',
|
||||
|
// 'no',
|
||||
|
// 'pl',
|
||||
|
// 'pt-BR',
|
||||
|
// 'pt',
|
||||
|
'ru', |
||||
|
// 'sk',
|
||||
|
// 'sv',
|
||||
|
// 'th',
|
||||
|
// 'tr',
|
||||
|
// 'uk',
|
||||
|
// 'vi',
|
||||
|
'zh-Hans', |
||||
|
'zh', |
||||
|
], |
||||
|
}; |
||||
|
|
||||
|
const bootstrap = (app) => { |
||||
|
console.log(app); |
||||
|
}; |
||||
|
|
||||
|
export default { |
||||
|
config, |
||||
|
bootstrap, |
||||
|
}; |
@ -0,0 +1,9 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
/* eslint-disable no-unused-vars */ |
||||
|
module.exports = (config, webpack) => { |
||||
|
// Note: we provide webpack above so you should not `require` it
|
||||
|
// Perform customizations to webpack config
|
||||
|
// Important: return the modified config
|
||||
|
return config; |
||||
|
}; |
@ -0,0 +1,35 @@ |
|||||
|
{ |
||||
|
"kind": "collectionType", |
||||
|
"collectionName": "authors", |
||||
|
"info": { |
||||
|
"singularName": "author", |
||||
|
"pluralName": "authors", |
||||
|
"displayName": "Author", |
||||
|
"description": "" |
||||
|
}, |
||||
|
"options": { |
||||
|
"draftAndPublish": true |
||||
|
}, |
||||
|
"pluginOptions": {}, |
||||
|
"attributes": { |
||||
|
"name": { |
||||
|
"pluginOptions": {}, |
||||
|
"type": "string", |
||||
|
"required": true, |
||||
|
"unique": true |
||||
|
}, |
||||
|
"description": { |
||||
|
"pluginOptions": {}, |
||||
|
"type": "text" |
||||
|
}, |
||||
|
"movies": { |
||||
|
"type": "relation", |
||||
|
"relation": "oneToMany", |
||||
|
"target": "api::movie.movie", |
||||
|
"mappedBy": "author" |
||||
|
}, |
||||
|
"english_name": { |
||||
|
"type": "string" |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
/** |
||||
|
* author controller |
||||
|
*/ |
||||
|
|
||||
|
const { createCoreController } = require('@strapi/strapi').factories; |
||||
|
|
||||
|
module.exports = createCoreController('api::author.author'); |
@ -0,0 +1,9 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
/** |
||||
|
* author router |
||||
|
*/ |
||||
|
|
||||
|
const { createCoreRouter } = require('@strapi/strapi').factories; |
||||
|
|
||||
|
module.exports = createCoreRouter('api::author.author'); |
@ -0,0 +1,9 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
/** |
||||
|
* author service |
||||
|
*/ |
||||
|
|
||||
|
const { createCoreService } = require('@strapi/strapi').factories; |
||||
|
|
||||
|
module.exports = createCoreService('api::author.author'); |
@ -0,0 +1,44 @@ |
|||||
|
{ |
||||
|
"kind": "collectionType", |
||||
|
"collectionName": "movies", |
||||
|
"info": { |
||||
|
"singularName": "movie", |
||||
|
"pluralName": "movies", |
||||
|
"displayName": "Movie", |
||||
|
"description": "" |
||||
|
}, |
||||
|
"options": { |
||||
|
"draftAndPublish": true |
||||
|
}, |
||||
|
"pluginOptions": {}, |
||||
|
"attributes": { |
||||
|
"name": { |
||||
|
"pluginOptions": {}, |
||||
|
"type": "string", |
||||
|
"required": true, |
||||
|
"unique": true |
||||
|
}, |
||||
|
"description": { |
||||
|
"pluginOptions": {}, |
||||
|
"type": "richtext" |
||||
|
}, |
||||
|
"cover": { |
||||
|
"type": "media", |
||||
|
"multiple": false, |
||||
|
"required": false, |
||||
|
"allowedTypes": [ |
||||
|
"images", |
||||
|
"files", |
||||
|
"videos", |
||||
|
"audios" |
||||
|
], |
||||
|
"pluginOptions": {} |
||||
|
}, |
||||
|
"author": { |
||||
|
"type": "relation", |
||||
|
"relation": "manyToOne", |
||||
|
"target": "api::author.author", |
||||
|
"inversedBy": "movies" |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
/** |
||||
|
* movie controller |
||||
|
*/ |
||||
|
|
||||
|
const { createCoreController } = require('@strapi/strapi').factories; |
||||
|
|
||||
|
module.exports = createCoreController('api::movie.movie'); |
@ -0,0 +1,9 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
/** |
||||
|
* movie router |
||||
|
*/ |
||||
|
|
||||
|
const { createCoreRouter } = require('@strapi/strapi').factories; |
||||
|
|
||||
|
module.exports = createCoreRouter('api::movie.movie'); |
@ -0,0 +1,9 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
/** |
||||
|
* movie service |
||||
|
*/ |
||||
|
|
||||
|
const { createCoreService } = require('@strapi/strapi').factories; |
||||
|
|
||||
|
module.exports = createCoreService('api::movie.movie'); |
@ -0,0 +1,20 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = { |
||||
|
/** |
||||
|
* 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 }*/) {}, |
||||
|
}; |
File diff suppressed because it is too large
Loading…
Reference in new issue