Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot POST /api/v1/users/register #80

Closed
AdityaBVerma opened this issue Jan 19, 2024 · 10 comments
Closed

Cannot POST /api/v1/users/register #80

AdityaBVerma opened this issue Jan 19, 2024 · 10 comments

Comments

@AdityaBVerma
Copy link

Screenshot 2024-01-19 111140
image
image
image
SOMEONE PLEASE POINT OUT WHERE I HAVE GONE WRONG

@ChanderParkash179
Copy link

try to update this below line in controller

   return res.status(200).json({ message: "works fine!" });

@SaunakNandi
Copy link

@AdityaBVerma Can I know what are the form-fields you have entered?

@SaunakNandi
Copy link

@AdityaBVerma can I know why you are not returning the res in registerUser ?

@shahad-hassan19
Copy link

shahad-hassan19 commented Feb 8, 2024

@AdityaBVerma Bhai src/index.js me ye add krke dekhna import {app} from './app.js'

agar ye bhi likha h src/index.js mein, to isko hta dena : import express from "express"; const app= express();

Hope it helps!

@AdityaBVerma
Copy link
Author

@shahad-hassan19 thank you brother this was the actual problem due to my carelessness and sorry for the late reply to everyone as my exams and practicals were going on

@snehitshh
Copy link

i have the same issue but its not working for me can someone help pleaseee

@AdityaBVerma
Copy link
Author

@snehitshh can you send the repo link?

@snehitshh
Copy link

https://github.com/snehitshh/backendStructuring sure here you go

@AdityaBVerma
Copy link
Author

AdityaBVerma commented Jun 6, 2024

@snehitshh add the below line in the src/index.js file
import {app} from './app.js'
and remove this from the same file
import express from "express";
const app= express();
image

@shahad-hassan19
Copy link

@snehitshh Did it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants