Support the ongoing development of Laravel.io →
posted 1 year ago

massofyanhadi liked this thread

1

Which version of Laravel you are using?

0

Hello faisal, it is Laravel Framework 9.19.0

0
moderator

Do you have an entry in your C:\Windows\System32\drivers\etc\hosts file for Jupiter.test (or can you pin Jupiter.test ) And can you open it?

0

Hi guys

I'm facing de npm run dev problem too with vite

My problem specifically is to access the http://localhost

I just create a project with composer and add brezze but cannot access http://localhost as indicated from vite after npm run dev (showed below)

vite v2.9.14 dev server running at:

> Local: http://localhost:3000/
> Network: use `--host` to expose

ready in 1709ms.


Laravel v9.20.0 

> APP_URL: http://localhost

Access http://localhost:3000 works but vite indicate to access http://localhost

I've been searching from the internet... trying to change APP_URL, changing server vite configuration but without success...

Could somebody help us please?

Best regards

My environment is...

PHP 8.1.8 (cli) (built: Jul 5 2022 21:55:55) (NTS gcc x86_64) Copyright (c) The PHP Group Zend Engine v4.1.8, Copyright (c) Zend Technologies

Laravel Framework 9.20.0

[administrador@srv3 larawithvite]$ npm -v 8.11.0 [administrador@srv3 larawithvite]$ node -v v16.16.0

the problem

0

Vite will keep running a development server for your assets when you run npm run dev. That server will recompile your assets when you change your blade views, CSS and JavaScript files.

The development server started by Vite, the one indicated by Local is not the one serving your Laravel project, it only serve the assets for the duration of that server being on.

As for the APP_URL, that is set in your .env file and should be set for the URL you use to serve your Laravel app, what that URL is will be different depending on how your serve the Laravel app locally.

For instance, for Laravel Valet, the URL will be {folderName}.test, that's what Laravel generates normally when creating a new project. For you, that was Jupiter.test.

For Laravel Sail it'll be localhost, at least according to the documentation. Might be different depending on if port 80 is free or not.

For php artisan serve that'll be localhost:8000 unless the port is already in use, then it'll increment to port 8001..., or unless you've specified another port with the --port flag.

0

Hi thinkverse, thanks for your help

In this video (https://www.youtube.com/watch?v=epMbfE37014) at exactly at 2min the teacher access http://breeze-test.test in his browser and his app is ok, but when access http://breeze-test.test in my browser after do the same steps of the video this is the problem

https://i.imgur.com/7KJKAp8.png

What could be happening?

0

What could be happening?

Seems you don't serve your Laravel app on the same URL as the Povilas does, he uses Laravel Valet on Mac and can access Laravel apps via the .test domain.

You'll have to access your Laravel app on whatever URL you get from your server, whether that be localhost or anything else.

0

now it is making sense...

with php -S 127.0.0.1:8765 -t public/

https://i.imgur.com/caQNDtr.png

without words to thanks thinkverse :))

0

With a RADIUS 2FA solution, a self-contained virtual appliance, you can implement your own user authentication policies, spanning both traditional passwords and https://www.protectimus.com/guides/windows-vpn-2fa/ credentials in one place. This enables you to manage user access from an appliance that is independent of your servers and other applications, making it a powerful tool for enhancing security across your entire environment without the need for expensive external hardware or software solutions.

Last updated 1 year ago.
0

yes ashleymorriss... I'm working using that solution without any problems.. many thanks

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Albion feohwizard Joined 7 Jul 2022

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.