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

Question about API returning 404 #1

Open
gdguradio opened this issue Jun 2, 2020 · 9 comments
Open

Question about API returning 404 #1

gdguradio opened this issue Jun 2, 2020 · 9 comments

Comments

@gdguradio
Copy link

Im not sure if I am putting this in the right place but I tried using the project to practice/learn API and Laravel with Vue.

My env.local file has -> VUE_APP_API_URL=http://127.0.0.1:8080/api/
My env file has -> FRONTPAGE_VERIFY_URL=http://localhost:8080/verify/

I didnt change any from the other files I just wanted to run the demo so I could check the files but I am getting 404 on registration API I've been checking solution but unfortunately I can't solve it on my own so I wanted to check if this will help me get the solution I need.

image

@PovilasKorop
Copy link
Collaborator

@gdguradio I'm not sure but it seems that you mixed the URLs. Your 127.0.0.1:8080 is the front-end URL, but you're calling the back-end API which should be localhost:8080/api/register ?

But it also depends on your server setup, I can't help you with that remotely, sorry.

@gdguradio
Copy link
Author

Hi,

Firstly allow me to say thank you for the this wonderful sample.

I tried using both localhost:8080 and 127.0.0.1:8080 since I'm using my local machine to run the project. Both fails and says 404 on the API but when I run it directly on the browser like http://localhost:8080/api/register it runs ok.

I hope I am making myself clear. I of writing this question I am still trying my best to figure this out.

Thank you.

@PovilasKorop
Copy link
Collaborator

@gdguradio sorry again but I can't help with this remotely, you need to debug it locally. Maybe you're mixing GET requests and POST requests? POST requests should not work in a browser.

@gdguradio
Copy link
Author

@PovilasKorop hi i must have convey my message wrong. When i said I can access the api in browser directly I mean it does not return 404 . That is why I am confused why I get 404 when I use the register button.

@ilejohn
Copy link

ilejohn commented Jul 13, 2020

Are you using 'php artisan serve' to run your laravel api before opening your vue frontend?

@UsamaKhan-hub
Copy link

Hey, i encountered with this same issue. Can anyone please guide me ?

@placecodex
Copy link

Hey, i encountered with this same issue. Can anyone please guide me ?

Copy .env.local.example to .env.local and edit URL of your API

@placecodex
Copy link

@PovilasKorop hi i must have convey my message wrong. When i said I can access the api in browser directly I mean it does not return 404 . That is why I am confused why I get 404 when I use the register button.

Copy .env.local.example to .env.local and edit URL of your API

@liburdi
Copy link

liburdi commented Nov 24, 2022

#7

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

6 participants