DEV Community

Cover image for Deploy a WebAssembly-powered Next.js app on Vercel serverless functions

Deploy a WebAssembly-powered Next.js app on Vercel serverless functions

Marc Seitz on January 25, 2024

What you will find in this article? Javascript is great but sometimes you need to run some code that is not directly available in Javasc...
Collapse
Β 
srbhr profile image
πš‚πšŠπšžπš›πšŠπš‹πš‘ πšπšŠπš’ β€’

Hey @mfts this tutorial of yours uses the pages directory or the new app directory?

// pages/api/count-pages.ts
import { NextApiRequest, NextApiResponse } from "next";
Enter fullscreen mode Exit fullscreen mode
Collapse
Β 
mfts profile image
Marc Seitz β€’

I’m using the pages router. But even if you use the app router you can colocate the pages api route alongside your app router.

It might actually not be much more effort to change it to app router

Collapse
Β 
srbhr profile image
πš‚πšŠπšžπš›πšŠπš‹πš‘ πšπšŠπš’ β€’

Thanks : )

Collapse
Β 
ayush4345 profile image
Ayush β€’

This is pages directory, I believe as the way he designed api is also changed in new next js

Collapse
Β 
srbhr profile image
πš‚πšŠπšžπš›πšŠπš‹πš‘ πšπšŠπš’ β€’

Okay

Collapse
Β 
fernandezbaptiste profile image
Bap β€’

Really nice explanation!

Collapse
Β 
mfts profile image
Marc Seitz β€’

Youβ€˜re welcome

Collapse
Β 
matijasos profile image
Matija Sosic β€’

thanks for the tutorial, mupdf seems super handy!

Collapse
Β 
mfts profile image
Marc Seitz β€’

Yes itβ€˜s fantastic

Collapse
Β 
debadyuti profile image
Deb β€’

Awesome tutorial. :)

Collapse
Β 
mfts profile image
Marc Seitz β€’

Thanks Deb πŸ‘

Collapse
Β 
shnai0 profile image
Iuliia Shnai β€’

πŸš€

Collapse
Β 
mfts profile image
Marc Seitz β€’

πŸŒ•

Collapse
Β 
uliyahoo profile image
uliyahoo β€’

Good read, thanks for sharing.

Collapse
Β 
mfts profile image
Marc Seitz β€’

Thanks πŸ™