Questions tagged [strapi]

Strapi is an open-source Node.js headless CMS built on top of Koa. It's frontend-agnostic and claims to not be an MVC framework. It auto-generate RESTful endpoints and has support for GraphQL and WebSockets.

2734 questions
7
votes
1 answer

Get all items on strapi collection

I am using Strapi API on my project, and I would like export my data in CSV file format. For this, I use a find() request, but the API returns only the first 100 items and I've ~ 2000 items in my database. Is it possible to remove the limit on my…
s-leg3ndz
  • 3,260
  • 10
  • 32
  • 60
7
votes
4 answers

Is it possible to get the raw body on a custom made endpoint on strapi?

I'm building a custom endpoint on Strapi. For this endpoint, I need to have the raw body content. Is it possible to obtain it from the ctx variable? stripe : async(ctx) => { // Handle the event const sig =…
Rui Figueiredo
  • 110
  • 1
  • 5
7
votes
4 answers

Bootstraping Strapi Role Permissions

I am a developer that is doing front end work, strapi and javascript for the first time. I hope someone could take pity on me and provide an example of how to set the Public role permissions via a bootstrap.js script. node.js v10.16.0 Strapi…
Eric Hansen
  • 185
  • 1
  • 10
7
votes
2 answers

How to integrate Strapi API and Admin Panel with another node app (that consumes Strapi API)?

I'm trying to develop an app that uses Strapi Admin Panel api generation, and, at the same time, serves as a website that consumes this api. So, basically, I'm trying to build a website: where /api route servers as a Strapi API endpoint where…
Denis Yakovenko
  • 3,241
  • 6
  • 48
  • 82
7
votes
5 answers

strapi + knex to execute complex Queries

How do I get the knex object to execute custom or complex queries within my strapi service? My Strapi version has the strapi-hook-knex and strapi-hook-bookshelf installed but when I run qb.raw it is an undefined object. This is to run queries like…
JMCHZA
  • 71
  • 1
  • 6
7
votes
1 answer

Strapi : How to get current user info in models js

Following the answer from here : Strapi : is it possible to track users modifying content? How do I get current user id?
zevskiel
  • 71
  • 1
  • 2
7
votes
3 answers

Connecting to MySql DB in strapi

I can't seem to understand the documentation in http://strapi.io/documentation/configuration#databases How to connect to MySqlDB? Where in databases.json do i set all my db settings like user: root, pwd: secret123, host: 192.12.2.123, etc.?
codely
  • 775
  • 2
  • 9
  • 21
6
votes
1 answer

Strapi admin API on subfolder hitting 404 on JS files behind nginx reverse proxy

I'm trying to setup Strapi on my DO droplet. I have a UI for my web app running on a subdomain (from here onwards: https://blah.mywebsite.com) - it's running a Next.js instance - but I believe that is irrelevant. I also have Strapi running on a…
BML91
  • 2,952
  • 3
  • 32
  • 54
6
votes
0 answers

Correct configuration for Strapi v4 and Nginx

I followed the official documentation…
aspirinemaga
  • 3,753
  • 10
  • 52
  • 95
6
votes
3 answers

How to securely set database password in Strapi?

The Strapi framework (as far as I understand) requires the database password to be provided at launch. Usually, the password is specified in the database.js file, like this: module.exports = ({ env }) => ({ defaultConnection: 'default', …
Mathew Alden
  • 1,458
  • 2
  • 15
  • 34
6
votes
3 answers

Getting an error during the dependency installation of Strapi installation process

recently I tried to install Strapi to my windows computer using "npx". But I'm getting an error when the dependencies get updated as below.I tried to uninstall and install knex but it didn't work. How can i solve tthis problem? strapi-app>npx…
6
votes
4 answers

How to change Strapi port number 1337 to other number?

Recently I tried to use Strapi. I want run two Strapi apps in single server. So I tried to change default port number - 1337 to other number (For example 1331) In ./config/server.js file. But when I tried to run Strapi, it failed. In Terminal below…
Denis Jung
  • 91
  • 1
  • 1
  • 5
6
votes
2 answers

Seeding data to database using Strapi headless CMS

I am fairly new to using Strapi the headless CMS. I am trying to populate some data into my database, just like using knex with node js, however, I am not sure about doing this. I have seen a tutorial where inside the config/functions/bootstrap.js,…
ninja_nugget
  • 712
  • 1
  • 8
  • 19
6
votes
3 answers

How to Query a Model based on its Relation in Strapi

Hope you are all having a nice day! :) I have tried to google my question but never can get a working example. I have a model for Projects. Projects has a 1:n relationship with the model Members. If I use: strapi.query('project').find({id: 1}); I…
Philipp Panik
  • 254
  • 1
  • 4
  • 15
6
votes
1 answer

How to update user in Strapi

In Strapi every user-defined collection type has a default services which allow to create/find/update/etc. on the corresponding Model. For Example the below code in a Strapi controller will update a bill collection type with the given data: await…