DEV Community

Discussion on: Create your personal shorturl with Vercel + GitHub Actions

Collapse
 
spences10 profile image
Scott Spence

Didn't know you could do this with yaml!

Will check this out! Thanks 🙏

Collapse
 
thewdhanat profile image
Thew

It's possible because it parses the yaml and create a serverless function to handle the request.

Collapse
 
spences10 profile image
Scott Spence

Genius!

I took a look at the package used in it, I got a little lost when I saw template literals of code modules

Do you think you could detail how the package works or would that be too much?

It looks like a fair bit of work went into it

Thread Thread
 
thewdhanat profile image
Thew

At the build step, it reads redirects.yml and generate a Vercel serverless function file api/redirect.js which contains parsed configuration. Template literal is for api/redirect.js generation.