strapi

Upload image to strapi

你。 提交于 2020-06-23 02:40:12
问题 I would like to upload an image to strapi with a html file. When I run the code, I obtain the error: POST http://localhost:1337/upload 500 (Internal Server Error). $.ajax({ type: 'POST', url: 'http://localhost:1337/upload', datatype: 'image/jpeg', data: JSON.stringify(img), complete: function(product) { console.log('Congrats, your product has been successfully created: ', product.description); }, fail: function(error) { console.log('An error occurred:', error); } }); 回答1: As I can see

Strapi Heroku deployment fails to connect to MongoDB

六月ゝ 毕业季﹏ 提交于 2020-06-17 15:49:49
问题 I am trying to deploy my Strapi app to Heroku with a mongoDB but receive this error every time I try to deploy. debug ⛔️ Server wasn't able to start properly. 2020-06-11T10:38:53.257748+00:00 app[web.1]: [2020-06-11T10:38:53.257Z] error Error connecting to the Mongo database. Server selection timed out after 30000 ms 2020-06-11T10:38:53.268085+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2020-06-11T10:38:53.268583+00:00 app[web.1]: npm ERR! errno 1 2020-06-11T10:38:53.270443+00:00 app[web.1]:

Strapi : debug ⛔️ Server wasn't able to start properly

六月ゝ 毕业季﹏ 提交于 2020-06-13 09:27:39
问题 Please fix my problem. It works when I try more than 50 times. Now it does not work I try 100+ times. I start this -> strapi new server � Starting to create your Strapi application. ? Choose your installation type Custom (manual settings) ? Choose your main database: MongoDB ? Database name: server ? Host: @cluster0-8tfpd.mongodb.net ? +srv connection: true ? Port (It will be ignored if you enable +srv): 27017 ? Username: deep ? Password: ******* ? Authentication database (Maybe "admin" or

Customizing CKEditor for Strapi gives “ckeditor-duplicated-modules” error

拈花ヽ惹草 提交于 2020-04-17 22:41:18
问题 I tried to modify this repo to customize CKEditor I want to use in my Strapi project. I added a lot more plugins, this is what my ckeditor.js file looks like: import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment.js'; import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js'; import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote.js'; import Bold from '@ckeditor

Customizing CKEditor for Strapi gives “ckeditor-duplicated-modules” error

前提是你 提交于 2020-04-17 22:39:49
问题 I tried to modify this repo to customize CKEditor I want to use in my Strapi project. I added a lot more plugins, this is what my ckeditor.js file looks like: import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment.js'; import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js'; import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote.js'; import Bold from '@ckeditor

Customizing CKEditor for Strapi gives “ckeditor-duplicated-modules” error

故事扮演 提交于 2020-04-17 22:39:27
问题 I tried to modify this repo to customize CKEditor I want to use in my Strapi project. I added a lot more plugins, this is what my ckeditor.js file looks like: import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment.js'; import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js'; import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote.js'; import Bold from '@ckeditor

不使用任何后端代码可以开发应用程序吗?

耗尽温柔 提交于 2020-02-27 14:33:20
在一个一切都在加速的世界里,你需要快速迭代以避免被抛弃。 技术有很多,但你不可能掌握每一项。你可能会问自己:“我怎么能在不了解后端代码的情况下构建应用程序呢?” 你需要快速、安全地进行迭代 不太了解后端代码、主机或DevOps 专注于已经很复杂的前端开发工作 那么,在没有任何后端代码的情况下,你能开发出一个可以工作的应用程序吗? 小芯告诉你:可以的。 下面我们就来一一介绍: 后端作为服务(BaaS)进行救援作为服务的后端是一个远程工具箱,不需要一行代码,它就可以帮助你快速构建通用的应用程序功能,比如自动验证、数据库持久性、搜索和统计信息。 有很多工具提供了这样的工具。 Firebase可能是最知名的,它是由谷歌和谷歌云平台支持的。它非常高效和酷,是作为一个云黑盒工具托管的。如果你需要本地工具,你可以使用自己的主机查看一些解决方案,比如 Kuzzle,一个基于NodeJS、弹性搜索和Redis的特别强大的物联网和高性能/流量应用服务(BaaS)。 FeatherJS,一个有各种连接器的NodeJS服务器,可用于MySQL, Postgres或MongoDB。 Strapi,一个帮助你快速建立CMS的NodeJS服务器。 当使用Baas时,你需要稍微改变主意。 与调用将根据自定义逻辑更改数据的自己的端点不同,与根据自定义逻辑调用端点来更改数据不同

How build headless CMS 'Strapi'

不想你离开。 提交于 2020-02-25 20:06:50
GIT: Open source Node.js Headless CMS Strapi First of all , I'm sorry that all my articles only talk about the things that the document does not have. I may have mentioned very little that the strapi document has detailed how to use Strapi. So you need to know what it is in advance. I worte a blog 《搭建KeystoneJS》 a long time ago. KeystoneJS is really a good thing for me, but since I met strapi, I've learned what 'Headless CMS' is. I even use it on small projects, like Wechat application(《一起DIY》). Strapi can help you quickly build a Back-end API system. You don't need to write code, build

Custom Controller code for Strapi Beta (3.0)

橙三吉。 提交于 2020-02-06 06:41:10
问题 I have some code from the previous version of Strapi that works, and the beta version of controllers is much different. There is multipart / santization boilerplate added and something has changed. Do not understand how to integrate my order object and stripe charge. Here is the boilerplate added: module.exports = { async create(ctx) { // New Boilerplate added with Strapi Beta - how to integrate this with custom stuff below? let entity; if (ctx.is('multipart')) { const { data, files } =

Custom Controller code for Strapi Beta (3.0)

随声附和 提交于 2020-02-06 06:40:47
问题 I have some code from the previous version of Strapi that works, and the beta version of controllers is much different. There is multipart / santization boilerplate added and something has changed. Do not understand how to integrate my order object and stripe charge. Here is the boilerplate added: module.exports = { async create(ctx) { // New Boilerplate added with Strapi Beta - how to integrate this with custom stuff below? let entity; if (ctx.is('multipart')) { const { data, files } =