mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 14:44:31 +00:00
Merge branch 'master' into improve-strapi-new
This commit is contained in:
commit
56a749d826
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ Node:
|
||||
**Please note that right now Node 11 is not Officially supported, and the current Node LTS (v10) should be used.**
|
||||
|
||||
Database:
|
||||
* MongoDB >= 3.x
|
||||
* MongoDB >= 3.x
|
||||
* MySQL >= 5.6
|
||||
* MariaDB >= 10.1
|
||||
* PostgreSQL >= 10
|
||||
@ -71,7 +71,7 @@ Database:
|
||||
npm install strapi@alpha -g
|
||||
````
|
||||
|
||||
**We recommend to use the latest version of Strapi to start your new project**.
|
||||
**We recommend to use the latest version of Strapi to start your new project**.
|
||||
Some breaking changes might happen, new releases are shipped every two weeks to fix/enhance the product.
|
||||
|
||||
#### 🏗 Create a new project
|
||||
@ -140,7 +140,7 @@ For general help using Strapi, please refer to [the official Strapi documentatio
|
||||
|
||||
#### Professional support
|
||||
|
||||
[Strapi Solutions](https://strapi.io), the company behind Strapi, provides a full range of solutions to get better results, faster. We're always looking for the next challenge: coaching, consulting, training, customization, etc.
|
||||
[Strapi Solutions](https://strapi.io), the company behind Strapi, provides a full range of solutions to get better results, faster. We're always looking for the next challenge: coaching, consulting, training, customization, etc.
|
||||
|
||||
[Drop us an email](mailto:support@strapi.io) to see how we can help you.
|
||||
|
||||
@ -160,4 +160,4 @@ Check out our [roadmap](https://portal.productboard.com/strapi) to get informed
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](LICENSE.md) Copyright (c) 2015-2018 [Strapi Solutions](https://strapi.io/).
|
||||
[MIT License](LICENSE.md) Copyright (c) 2015-2019 [Strapi Solutions](https://strapi.io/).
|
||||
|
||||
@ -39,6 +39,10 @@ The CLI will ask you to choose your database: select MongoDB, Postgres or MySQL.
|
||||
|
||||
This action creates a new folder named `my-project` with the entire [files structure](../concepts/concepts.md#files-structure) of a Strapi application.
|
||||
|
||||
::: note
|
||||
Unfortunately, there is an issue on Windows, you will probably be stuck and unable to enter your `Database name` to continue. Using a VM is one of the solutions. See [the issue](https://github.com/strapi/strapi/issues/1281).
|
||||
:::
|
||||
|
||||
**#3 — Go to your project and launch the server:**
|
||||
|
||||
In your terminal run the following commands:
|
||||
|
||||
@ -148,6 +148,17 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
**Example**
|
||||
```js
|
||||
// Create a pet
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '/pets', true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify({
|
||||
owner: '5c151d9d5b1d55194d3209be' // The id of the user you want to link
|
||||
}));
|
||||
```
|
||||
|
||||
### One-to-one
|
||||
|
||||
Refer to the [one-to-one concept](../concepts/concepts.md#one-to-one) for informations.
|
||||
@ -211,6 +222,17 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
**Example**
|
||||
```js
|
||||
// Create an address
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '/addresses', true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify({
|
||||
user: '5c151d9d5b1d55194d3209be' // The id of the user you want to link
|
||||
}));
|
||||
```
|
||||
|
||||
### One-to-many
|
||||
|
||||
Refer to the [one-to-many concept](../concepts/concepts.md#one-to-many) for more informations.
|
||||
@ -274,6 +296,25 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
**Examples**
|
||||
```js
|
||||
// Create an article
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '/articles', true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify({
|
||||
author: '5c151d9d5b1d55194d3209be' // The id of the user you want to link
|
||||
}));
|
||||
|
||||
// Update an article
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('PUT', '/users/5c151d9d5b1d55194d3209be', true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify({
|
||||
articles: ['5c151d51eb28fd19457189f6', '5c151d51eb28fd19457189f8'] // Set of ALL articles linked to the user (existing articles + new article or - removed article)
|
||||
}));
|
||||
```
|
||||
|
||||
### Many-to-many
|
||||
|
||||
Refer to the [many-to-many concept](../concepts/concepts.md#many-to-many).
|
||||
@ -343,6 +384,17 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
**Example**
|
||||
```js
|
||||
// Update a product
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('PUT', '/products/5c151d9d5b1d55194d3209be', true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify({
|
||||
categories: ['5c151d51eb28fd19457189f6', '5c151d51eb28fd19457189f8'] // Set of ALL categories linked to the product (existing categories + new category or - removed category)
|
||||
}));
|
||||
```
|
||||
|
||||
### Polymorphic
|
||||
|
||||
The polymorphic relationships are the solution when you don't know which kind of model will be associated to your entry. A common use case is an `Image` model that can be associated to many others kind of models (Article, Product, User, etc).
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2018 Nikolay Tsenkov (nikolay@tsenkov.net).
|
||||
Copyright (c) 2019 Nikolay Tsenkov (nikolay@tsenkov.net).
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
Copyright (c) 2017, Vandium Software Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2015-2018 Strapi Solutions.
|
||||
Copyright (c) 2015-2019 Strapi Solutions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user