Next.js Discord

Discord Forum

Facing API Route issue in my nextjs app which is running on localhost project structure: next@14.2.

Unanswered
Bosnian Coarse-haired Hound posted this in #help-forum
Open in Discord
Bosnian Coarse-haired HoundOP
── src/
│ ├── app/
│ │ ├── bookings/
│ │ │ ├── flights/
│ │ │ ├── hotels/
│ │ │ ├── cabs/
│ │ │ └── buses/
│ │ ├── chatbot/
│ │ ├── travel-planner/
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ │ ├── about/
│ │ └── api/
│ │ ├── users/
│ │ │ ├── route.ts
│ │ ├── bookings/
│ │ │ ├── route.ts
│ │ ├── flights/
│ │ │ ├── route.ts

// app/api/users/routes.ts
import { NextResponse } from "next/server";
export function GET(){
console.log('Signup route working');
return NextResponse.json({ message: 'Signup route working' });
};
http://localhost:3000/api/users
Getting 404 Not found

4 Replies