Skip to content

bns-hack/mfmok_my-templates

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

my-templates

these are some of the issues encountered

  1. FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Solution: export NODE_OPTIONS=--max-old-space-size=4096

  1. Access to XMLHttpRequest at 'https://api-wwlooy.bunnyenv.com/books' from origin 'https://app-wwlooy.bunnyenv.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://app-wwlooy.bunnyenv.com/' that is not equal to the supplied origin.

Solution: change the CORS options

let frontendUrl = process.env.FRONTEND_URL || "http://localhost:3000";

var corsOptions = { // need to strip ending slash from frontendUrl for CORS to work

origin: frontendUrl.replace(//+$/, '')

};

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.5%
  • CSS 1.5%
  • Other 1.0%