Coder Social home page Coder Social logo

Laradumps and WSL2 about laradumps HOT 6 CLOSED

laradumps avatar laradumps commented on June 20, 2024
Laradumps and WSL2

from laradumps.

Comments (6)

dansysanalyst avatar dansysanalyst commented on June 20, 2024 1

Hi @K2ouMais,
I was sure I replied to this issue, now I can't see my reply (I hope I didn't reply accidentally somewhere else).

Do you have the host key configured as DS_APP_HOST=host.docker.internal in your .env?

I am on a Mac, so I can't run WSL, but maybe this πŸ“½οΈ YouTube video by @icarojobs (in Portuguese) can be helpful. It was recorded for another version but it still applies.

πŸ’‘ There are also some settings for VSCode in WSL2 that can be useful.

Thanks for submitting an issue!

from laradumps.

luanfreitasdev avatar luanfreitasdev commented on June 20, 2024 1

Hi @K2ouMais , did you try to put the ipv4?

DS_APP_HOST=0.0.0.0

or

DS_APP_HOST=192.168.0....

image

from laradumps.

K2ouMais avatar K2ouMais commented on June 20, 2024 1

Dan and I will tomorrow try to get a way around this.

I think personaly wsl2 has a great potential and needs some attention because not everyone likes to use Docker or Laravel Sail that also uses docker.

I will also try your suggestion πŸ‘πŸ»

from laradumps.

K2ouMais avatar K2ouMais commented on June 20, 2024

That setting is for getting it working with docker. I got it to work with docker without a problem. πŸ‘πŸ»

What I wanted was to get it to run with WSL2 on windows. For this I would love to make it work with a simple php artisan serve.

I know this is not a simple task if I take a look at Spatie Ray. They have a way to run it, but it is complicated.

from laradumps.

K2ouMais avatar K2ouMais commented on June 20, 2024

This is not a issue. Let me explain.

First you have to get the IP of your WSL2 instance:
ip

And after that you just have to insert that IP into your .env file after a php artisan ds:init.

In my case my .env file vars for Laradumps looks like this:
env

After everything is set you could make a test route for dumping something into the app.

Watch out, that you have to change the IP of your .env after every reboot, because the IP will change after that.

I am going to see, if I can find a way around this and make a PR just for completion.

Sorry for the trouble and thank you for Laradumps.

EDIT:
A good way to always get the IP could be if we could read the /etc/resolv.conf

from laradumps.

dansysanalyst avatar dansysanalyst commented on June 20, 2024

Updated doc: https://laradumps.dev/#/laravel/get-started/configuration?id=wsl

from laradumps.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.