How to run "sencha app watch" without a webserver - extjs

I am already serving my ExtJS 5.1 development application on a local (nginx) web server, and I don't need the development webserver from Sencha Cmd when running sencha app watch.
Is there any flag or other command equivalent but without running this extra web server?
Alternativelly, what would be an equivalent command for building the development app (not making the entire build proccess of a production app) but without the "watch" characteristics? ie. issued automatically by the IDE every time I save a .js file.

You can switch off the web server.
Go to the sencha.cfg file located at <App name>\app\.sencha\app and put at the bottom of the file:
skip.web.start=true or skip.web.start=1

I am using Sencha Cmd 6.7.0.63
Create a local.properties file in the app directory and add there:
skip.web.start=true
Vales that can be set in the local.properties file are to be looked up in the sencha installation dir:
Sencha\Cmd\6.7.0.63\ant\build\app\build.properties
Sencha\Cmd\6.7.0.63\ant\build\app\*.properties

Related

How to build react application (with multiple environments) that runs on Apache

Typically deployment process: You build once
In Java or any other programming language, you build your application once and then deploy to various environments. There is like .env or .properties file which has environment configurations that are loaded when application starts.
How does react work
In react, from my understand there is package.json. So, it uses it to do build. OUr package.json has following content:
"price": "http://11.222.111.122/myApi/pricing",
"teacher" : "http://11.222.111.122/myApi/teacher",
"mainbanner" : "https://11.222.111.122/myApi/mainbanner",
We running build the application and run on Apache server (not on node.js)
Question:
a. How can we have environment file so that we can specify to use above urls at time of starting application.
Obviously, we have different urls for different environment.
Navigate into your React project folder using Terminal or CMD and build your React project using command:
npm run build
Then a build folder will be created inside your React project which will contain the final production files. Just upload those files into www or public folder of your Apache server.
If you want use it as subdomain, upload it to your subdomain folder.
Remember that React built version works like other Javascript web applications at the end.

Sencha Touch Deployment Options?

I am very new to ExtJS and Sencha Touch. I am trying to learn Sencha Touch, and was able to get a demo version running locally using 'sencha watch'. But I want to deploy this somewhere like Heroku, Azure, AWS or wherever.
How do I get this in production?
I'd appreciate it,
CMazz
How do I get this in production?
Developing your application simply means editing source code and refreshing the browser. All source files are dynamically loaded on demand. There's no building process involved. When it comes to deployment, Sencha Cmd provides the following four build environment options:
Production environment
Creates a production build that is normally hosted on a web server and serves multiple clients (devices). The build is offline-capable using HTML 5 application cache, and is enabled to perform over-the-air updates. You can build using below command :-
sencha app build //Or
sencha app build production
Testing environment
Intended for QA prior to production. All JavaScript and CSS source files are bundled, but not minified, which makes it easier to debug. You can build using below command :-
sencha app build testing
After run the following command, In you app there is build folder. See below screenshot
Now if want to host production then go inside of production folder then after build you code in to your web server (Heroku, Azure, AWS or wherever) and same for testing environment.
For more details you can refers Sencha docs

Where to install Angular on Apache?

First of all, my question is not about how to install angular. I'm just getting started with this framework and already got a question right at the beginning.
Usually I create new web projects (HTML, PHP...) in the default web folder of the apache webserver (/var/www/). I did this with angular too under /var/www/firstAngularProject, but it seems the application itself is only accessible on its default port on the webserver root. In my case this is localhost:4200
When I try to open the path in my browser localhost/firstAngularProject I see the index structure and I think this could become a security issue.
So my question is where should I install the angular project or what is the usual way to install it?
When you run Angular using the cli command ng start (which I assume, based on you describing using localhost:4200) you're running the application using webpack-dev-server. This is undesirable since it's only meant for use during development, not for production.
In production Angular works just like any other frontend framework. You build the application with ng build --prod which produces a number of build artifact (in the /dist folder). These artifact are simply static files you make available through some webserver, in your case Apache, by copying the content of the /dist folder to /var/www (or whichever is your default web folder) and that's about it.

how to run sencha web application without compiling

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.
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.
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.

Sencha Cmd won't build on another workstation

So I am trying to set up another ExtJS (4.2.1) dev workstation I've got Ruby 1.9.3, Sencha Cmd 4.0.4.84 installed and latest Java VM too.
The build won't work on this one though, I'm getting:
[INF] executing compass using system installed ruby runtime
Errno::ENOENT on line ["38"] of C: No such file or directory - C:/devtfs/CustomerPortal/CustomerPortal.UI/Content/Customer_Portal_UI/build/temp/production/Customer_Portal_UI/slicer-temp/.sass-cache/82daaa66b7a4761963814fd25131bf0f81370ec9/Customer_Portal_UI-example.scssc
82daaa66b7a4761963814fd25131bf0f81370ec9 folder does exist, but it's empty.
I've tried
sencha ant clean
sencha app refresh
sencha app build --clean
No go. Ever seen this issue ?
Thanks!
EDIT: Hmm, even after this error, the application seems to be running fine on the Sencha web server, but the index.html file is the last thing that's not created in build/production.

Resources