Skip to content

Instantly share code, notes, and snippets.

@Marktawa
Created August 25, 2022 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marktawa/ab7e95bc1bad822f40a1662abca672fe to your computer and use it in GitHub Desktop.
Save Marktawa/ab7e95bc1bad822f40a1662abca672fe to your computer and use it in GitHub Desktop.
Fix for “Strapi: Warning: an error occurred while requesting the API”
/* Procedure
*
* Update config/server.js with the code below
* In your terminal run:
* npm run build
* then
* npm run develop
*/
module.exports = ({ env }) => ({
host: env('HOST', '127.0.0.1'),
port: env.int('PORT', 1337),
app: {
keys: env.array('APP_KEYS'),
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment