Skip to content
Back

Setting up dev env in PHPStorm

  • 0
  • General
Binyamin
19 May, 2023, 18:41

This command should let compose skip that requirement.

TL;DR
User is seeking help in setting up a development environment in PHPStorm. They mention their approach and the steps they take to modify the console code and rebuild it. They also mention restarting the appwrite container to apply changes. They ask if there is any other solution. Another user suggests restarting the appwrite container or using `docker compose restart appwrite` to reflect changes in the backend PHP code. The original user expresses concern about developing blind without any feedback. Other users provide suggestions and solutions. One user mentions deleting the generated `appwrite-dev` image and following the setup steps again. Another user suggests re-cloning the project. There is
Binyamin
19 May, 2023, 18:41

Let me try again on my Windows

Binyamin
19 May, 2023, 18:47

Took 5 minutes but finished with red. Can you try delete the generated appwrite-dev image and do this steps https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md#setup-from-source again?

I'll also try to reclone the project.

Binyamin
19 May, 2023, 18:48
Mattias Aabmets
19 May, 2023, 18:49

I'll redo it from the top

Mattias Aabmets
19 May, 2023, 18:58

@Binyamin I think I got it done.

Mattias Aabmets
19 May, 2023, 18:58

So how do I now see the Appwrite client in my browser?

Binyamin
19 May, 2023, 18:59

If it's up and running just go to http://localhost

Mattias Aabmets
19 May, 2023, 18:59

okay, i thought it was at some port other than 80 or something

Mattias Aabmets
19 May, 2023, 19:00

so if i make a change either to the backend php code or the frontend svelte code, how can i propagate that change into the container?

Binyamin
19 May, 2023, 19:01

This is also Steven, haven't done that yet.

Mattias Aabmets
19 May, 2023, 19:02

So you mean I have to develop blind without any feedback? This is impossible.

Mattias Aabmets
19 May, 2023, 19:03

STEVEN

Mattias Aabmets
19 May, 2023, 19:03

What is this

Binyamin
19 May, 2023, 19:03

There's probably solution I just never done that

Mattias Aabmets
19 May, 2023, 19:04

Okay, thanks for your help, I'll try to figure something out. 🙂

Maniac_Fighter
19 May, 2023, 19:04

if you made changes to the backend php code. docker compose restart appwrite would reflect those changes

Binyamin
19 May, 2023, 19:05

This is what I've done Is this is the only way?

Binyamin
19 May, 2023, 19:05

Because Swoole won't reload the loaded PHP files?

Maniac_Fighter
19 May, 2023, 19:06

It works for me all the time by this command😅

Maniac_Fighter
19 May, 2023, 19:06

If it doesn't, shutting them down, docker compose build then starting them up do the trick

Mattias Aabmets
19 May, 2023, 19:08

Thank you both @Binyamin and @Maniac_Fighter for your help, I hope others will find this thread useful in the future.

Drake
19 May, 2023, 19:13

right, swoole loads the code into memory on startup so changing the code after has no effect.

I also restart the container to apply changes

Drake
19 May, 2023, 19:16

for the front end, i think most people run the dev server locally and just make sure to point the endpoint to the running backend.

My approach isn't as good for fast iteration because i mount the build output into appwrite:

TypeScript
$ ls -la console
lrwxr-xr-x  1 steven  staff    17B Nov 23 16:52 console -> app/console/build

and then:

  1. modify the console code in my local appwrite repo
  2. run npm run build to rebuild the Console
  3. restart appwrite
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more