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
Saurabh Rai

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
Saurabh Rai

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
Saurabh Rai

Okay

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 πŸ™

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
 
fernandezbaptiste profile image
Bap

Really nice explanation!

Collapse
 
mfts profile image
Marc Seitz

Youβ€˜re welcome