feral
feral copied to clipboard
Created support for Vercel using Node.js runtime
Created the IOVercel file. Thanks Arman and Tonio for your help!
Based on discussions with Arman, it seems like Vercel is not compatible with the Http4s way of creating a web app. This is mainly due to routes being declared via the folder structure for web apps that are deployed to Vercel. Therefore, the example illustrated in VercelNodejs.scala is unable to work with Vercel.
The current steps to use Feral with Vercel are:
- Write a handler for a specific route
- Run
fastLinkJSto generate the corresponding JS files - Copy the JS files into a folder named
apiwhich should ideally be in a separate project folder - Rename the JS files (and optionally put them in subfolders within
api) to define the route - Deploy the project to Vercel
References: https://vercel.com/docs/functions/runtimes/node-js https://github.com/orgs/vercel/discussions/947