Hello I am new to Sencha. I have created a test application using sencha cmd. When I have to run it i have to compile it. Is there any way so that I can run the application without compiling and without starting web server.
-
1Sencha app watch starts a microserver on http://localhost:1841. You can use that in the browser. But you can't execute PHP in that way. – Johan Van de Merwe Jan 17 '17 at 18:22
2 Answers
You can access your uncompiled application, but you always have to use a web server to access your application, because there are problems with AJAX without a web server.
What I did to get this working:
- I installed a local web server as a service (in my case it's IIS, but Apache or any other should work as well)
- My local web server root directory points to my git repo directory.
- In that git repo, I have the
myapp-dev
directory containing the uncompiled ExtJS application, themyapp
directory, and the bin directory containing my backend API. The app.json file in
myapp-dev
tells Cmd to compile into themyapp
directory:"output": { "base": "../myapp", "appCache": { "enable": false } },
That way, the relative paths to the server API are the same for both the uncompiled and the compiled version, e.g. ../api/GetSettings
points to the same path for both versions.
I can now open localhost/myapp-dev/index.html
in the browser and get the uncompiled version, or I can open localhost/myapp/index.html
in the browser and get the compiled version.

- 19,906
- 19
- 75
- 162
You can just place your app files in a directory inside a server root, then open the index.html directly.
While it is desirable to compile it for production (to get a better performance), it is certainly not necessary if you just want to have your app in "development" mode all the time.

- 16
- 1
- 3