Skip to content

Frodo1980/netlifyforumquestion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository in addition to this question on Netlify-support-forum.

Prerequisites: install netlify-CLI for local Dev-Server

For reproducing follow these steps:

  1. clone branch "Express" for the local running Express-server
  2. clone branch "function" for the wrapped server
  3. in each cloned repository run npm run start

Test Express-Server for serving the customized file

in your local browser call http://localhost:3000/.netlify/functions/api?A13=TextForCellA13&B15=ThisGoesToB15

expected behavior: you get a xlsx.-file with all of the content your given xlsx.-file had (here: file_example.xlsx), additionally the values given as URL-parameters are included in the specified cells.

It works! 😀

Test lambda-function which should do the same

Calling the npm run start runs a development-server. After starting the server you see in the console the adress where you can reach the server.

Call this adress and put the adress to call the function (/.netlify/functions/api?A2=test&A13=Hello) after the server-adress:

You will get a corrupted xlsx.-file which cannot be opened.

But why? Where is the difference between the express-server alone and the lambda-function which should do the same?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published