This is a movie app that uses the TMDB API to fetch movies and display them on the page.
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
This example shows how to use Next.js along with TypeScript to build a simple blog.
Once you have access to the environment variables you'll need, deploy the example using Vercel (Documentation).
-
The
pages/api
directory is for Movie API routes. You can use this directory to create API routes for your movie app. Learn more about API routes in Next.js. -
This example uses getServerSideProps for data fetching. You can replace it with any other data fetching library.
-
This example uses TypeScript. You can replace it with any other language, such as Flow.
-
This example uses styled-components. You can replace it with any other CSS-in-JS library.
-
This example uses ESLint and Prettier for code formatting. You can replace it with any other linter/formatter.
-
This example uses Jest for unit testing. You can replace it with any other test runner.
-
This example uses Open Graph tags for social media previews. You can replace them with any other tags or remove them.