Create an API Route in Next.js

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
~ 5 years ago

Awesome. Thanks for sharing .

Torleif Berger
~ 5 years 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?