Skip to content

Commit 2e67fc9

Browse files
Initial commit
0 parents  commit 2e67fc9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+10749
-0
lines changed

Diff for: .editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[{package.json,*.yml}]
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.md]
16+
trim_trailing_whitespace = false

Diff for: .env.example

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
HOST=0.0.0.0
2+
PORT=1337
3+
APP_KEYS="toBeModified1,toBeModified2"
4+
API_TOKEN_SALT=tobemodified
5+
ADMIN_JWT_SECRET=tobemodified
6+
TRANSFER_TOKEN_SALT=tobemodified
7+
JWT_SECRET=tobemodified

Diff for: .eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.cache
2+
build
3+
**/node_modules/**

Diff for: .eslintrc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": "eslint:recommended",
4+
"env": {
5+
"commonjs": true,
6+
"es6": true,
7+
"node": true,
8+
"browser": false
9+
},
10+
"parserOptions": {
11+
"ecmaFeatures": {
12+
"experimentalObjectRestSpread": true,
13+
"jsx": false
14+
},
15+
"sourceType": "module"
16+
},
17+
"globals": {
18+
"strapi": true
19+
},
20+
"rules": {
21+
"indent": ["error", 2, { "SwitchCase": 1 }],
22+
"linebreak-style": ["error", "unix"],
23+
"no-console": 0,
24+
"quotes": ["error", "single"],
25+
"semi": ["error", "always"]
26+
}
27+
}

Diff for: .gitignore

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
############################
2+
# OS X
3+
############################
4+
5+
.DS_Store
6+
.AppleDouble
7+
.LSOverride
8+
Icon
9+
.Spotlight-V100
10+
.Trashes
11+
._*
12+
13+
14+
############################
15+
# Linux
16+
############################
17+
18+
*~
19+
20+
21+
############################
22+
# Windows
23+
############################
24+
25+
Thumbs.db
26+
ehthumbs.db
27+
Desktop.ini
28+
$RECYCLE.BIN/
29+
*.cab
30+
*.msi
31+
*.msm
32+
*.msp
33+
34+
35+
############################
36+
# Packages
37+
############################
38+
39+
*.7z
40+
*.csv
41+
*.dat
42+
*.dmg
43+
*.gz
44+
*.iso
45+
*.jar
46+
*.rar
47+
*.tar
48+
*.zip
49+
*.com
50+
*.class
51+
*.dll
52+
*.exe
53+
*.o
54+
*.seed
55+
*.so
56+
*.swo
57+
*.swp
58+
*.swn
59+
*.swm
60+
*.out
61+
*.pid
62+
63+
64+
############################
65+
# Logs and databases
66+
############################
67+
68+
.tmp
69+
*.log
70+
*.sql
71+
*.sqlite
72+
*.sqlite3
73+
74+
75+
############################
76+
# Misc.
77+
############################
78+
79+
*#
80+
ssl
81+
.idea
82+
nbproject
83+
public/uploads/*
84+
!public/uploads/.gitkeep
85+
86+
############################
87+
# Node.js
88+
############################
89+
90+
lib-cov
91+
lcov.info
92+
pids
93+
logs
94+
results
95+
node_modules
96+
.node_history
97+
98+
############################
99+
# Tests
100+
############################
101+
102+
coverage
103+
104+
############################
105+
# Strapi
106+
############################
107+
108+
.env
109+
license.txt
110+
exports
111+
*.cache
112+
dist
113+
build
114+
.strapi-updater.json

Diff for: README.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# 🚀 Getting started with Strapi
2+
3+
Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/dev-docs/cli) (CLI) which lets you scaffold and manage your project in seconds.
4+
5+
### `develop`
6+
7+
Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-develop)
8+
9+
```
10+
npm run develop
11+
# or
12+
yarn develop
13+
```
14+
15+
### `start`
16+
17+
Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-start)
18+
19+
```
20+
npm run start
21+
# or
22+
yarn start
23+
```
24+
25+
### `build`
26+
27+
Build your admin panel. [Learn more](https://docs.strapi.io/dev-docs/cli#strapi-build)
28+
29+
```
30+
npm run build
31+
# or
32+
yarn build
33+
```
34+
35+
## ⚙️ Deployment
36+
37+
Strapi gives you many possible deployment options for your project including [Strapi Cloud](https://cloud.strapi.io). Browse the [deployment section of the documentation](https://docs.strapi.io/dev-docs/deployment) to find the best solution for your use case.
38+
39+
## 📚 Learn more
40+
41+
- [Resource center](https://strapi.io/resource-center) - Strapi resource center.
42+
- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation.
43+
- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community.
44+
- [Strapi blog](https://strapi.io/blog) - Official Strapi blog containing articles made by the Strapi team and the community.
45+
- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements.
46+
47+
Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome!
48+
49+
## Community support
50+
51+
For general help using Strapi, please refer to [the official Strapi documentation](https://docs.strapi.io). For additional help, you can use one of these channels to ask a question:
52+
53+
- [Discord](https://discord.strapi.io) (For live discussion with the Community and Strapi team)
54+
- [GitHub](https://github.com/strapi/strapi) (Bug reports, Contributions)
55+
- [Community Forum](https://forum.strapi.io) (Questions and Discussions)
56+
- [Feedback section](https://feedback.strapi.io) (Roadmap, Feature requests)
57+
- [Twitter](https://twitter.com/strapijs) (Get the news fast)
58+
- [Facebook](https://www.facebook.com/Strapi-616063331867161)
59+
- [YouTube Channel](https://www.youtube.com/strapi) (Learn from Video Tutorials)
60+
61+
---
62+
63+
<sub>🤫 Psst! [Strapi is hiring](https://strapi.io/careers).</sub>

Diff for: config/admin.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = ({ env }) => ({
2+
auth: {
3+
secret: env('ADMIN_JWT_SECRET'),
4+
},
5+
apiToken: {
6+
salt: env('API_TOKEN_SALT'),
7+
},
8+
transfer: {
9+
token: {
10+
salt: env('TRANSFER_TOKEN_SALT'),
11+
},
12+
},
13+
});

Diff for: config/api.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
rest: {
3+
defaultLimit: 25,
4+
maxLimit: 100,
5+
withCount: true,
6+
},
7+
};

Diff for: config/database.js

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
const path = require('path');
2+
3+
module.exports = ({ env }) => {
4+
const client = env('DATABASE_CLIENT', 'sqlite');
5+
6+
const connections = {
7+
mysql: {
8+
connection: {
9+
connectionString: env('DATABASE_URL'),
10+
host: env('DATABASE_HOST', 'localhost'),
11+
port: env.int('DATABASE_PORT', 3306),
12+
database: env('DATABASE_NAME', 'strapi'),
13+
user: env('DATABASE_USERNAME', 'strapi'),
14+
password: env('DATABASE_PASSWORD', 'strapi'),
15+
ssl: env.bool('DATABASE_SSL', false) && {
16+
key: env('DATABASE_SSL_KEY', undefined),
17+
cert: env('DATABASE_SSL_CERT', undefined),
18+
ca: env('DATABASE_SSL_CA', undefined),
19+
capath: env('DATABASE_SSL_CAPATH', undefined),
20+
cipher: env('DATABASE_SSL_CIPHER', undefined),
21+
rejectUnauthorized: env.bool(
22+
'DATABASE_SSL_REJECT_UNAUTHORIZED',
23+
true
24+
),
25+
},
26+
},
27+
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
28+
},
29+
mysql2: {
30+
connection: {
31+
host: env('DATABASE_HOST', 'localhost'),
32+
port: env.int('DATABASE_PORT', 3306),
33+
database: env('DATABASE_NAME', 'strapi'),
34+
user: env('DATABASE_USERNAME', 'strapi'),
35+
password: env('DATABASE_PASSWORD', 'strapi'),
36+
ssl: env.bool('DATABASE_SSL', false) && {
37+
key: env('DATABASE_SSL_KEY', undefined),
38+
cert: env('DATABASE_SSL_CERT', undefined),
39+
ca: env('DATABASE_SSL_CA', undefined),
40+
capath: env('DATABASE_SSL_CAPATH', undefined),
41+
cipher: env('DATABASE_SSL_CIPHER', undefined),
42+
rejectUnauthorized: env.bool(
43+
'DATABASE_SSL_REJECT_UNAUTHORIZED',
44+
true
45+
),
46+
},
47+
},
48+
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
49+
},
50+
postgres: {
51+
connection: {
52+
connectionString: env('DATABASE_URL'),
53+
host: env('DATABASE_HOST', 'localhost'),
54+
port: env.int('DATABASE_PORT', 5432),
55+
database: env('DATABASE_NAME', 'strapi'),
56+
user: env('DATABASE_USERNAME', 'strapi'),
57+
password: env('DATABASE_PASSWORD', 'strapi'),
58+
ssl: env.bool('DATABASE_SSL', false) && {
59+
key: env('DATABASE_SSL_KEY', undefined),
60+
cert: env('DATABASE_SSL_CERT', undefined),
61+
ca: env('DATABASE_SSL_CA', undefined),
62+
capath: env('DATABASE_SSL_CAPATH', undefined),
63+
cipher: env('DATABASE_SSL_CIPHER', undefined),
64+
rejectUnauthorized: env.bool(
65+
'DATABASE_SSL_REJECT_UNAUTHORIZED',
66+
true
67+
),
68+
},
69+
schema: env('DATABASE_SCHEMA', 'public'),
70+
},
71+
pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) },
72+
},
73+
sqlite: {
74+
connection: {
75+
filename: path.join(
76+
__dirname,
77+
'..',
78+
env('DATABASE_FILENAME', '.tmp/data.db')
79+
),
80+
},
81+
useNullAsDefault: true,
82+
},
83+
};
84+
85+
return {
86+
connection: {
87+
client,
88+
...connections[client],
89+
acquireConnectionTimeout: env.int('DATABASE_CONNECTION_TIMEOUT', 60000),
90+
},
91+
};
92+
};

Diff for: config/middlewares.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = [
2+
'strapi::errors',
3+
'strapi::security',
4+
'strapi::cors',
5+
'strapi::poweredBy',
6+
'strapi::logger',
7+
'strapi::query',
8+
'strapi::body',
9+
'strapi::session',
10+
'strapi::favicon',
11+
'strapi::public',
12+
];

Diff for: config/server.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = ({ env }) => ({
2+
host: env('HOST', '0.0.0.0'),
3+
port: env.int('PORT', 1337),
4+
app: {
5+
keys: env.array('APP_KEYS'),
6+
},
7+
webhooks: {
8+
populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false),
9+
},
10+
});

0 commit comments

Comments
 (0)