2

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.

2 Answers2

1

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, the myapp directory, and the bin directory containing my backend API.
  • The app.json file in myapp-dev tells Cmd to compile into the myapp 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.

Alexander
  • 19,906
  • 19
  • 75
  • 162
0

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.