Create an API Route in Next.js

John Lindquist
InstructorJohn Lindquist

Share this video with your friends

Send Tweet

Next.js supports the ability to create APIs based on routes inside of an pages/api folder. This opens up a fantastic workflow for incorporating node services into your projects without any configuration. This lesson walks you through the basics of creating your first API route in Next.js

Md. Anam Hossain
Md. Anam Hossain
~ 2 years ago

Awesome. Thanks for sharing .

Torleif
Torleif
~ a year ago

Here you imported a JSON-file, but is it possible to do file-system operations? For example if I had a directory with data files, is it possible to scan and read from / write to those files from a pages/api route file?