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
Related
I'm using ExtJS 6.2 and when we develop in our local enviros we're access the unminimized code through https://localhost:8443. Once we deploy to our production enviros, the ExtJS code is minimized and sometimes we have errors that don't occur in our development enviros and we can't seem to find it until going through the deploy process.
I'd like to be able to test the production build locally in my development enviro but can't seem to find a way to access that built, minimized code.
It depends on how your server and build process is set up.
If you are using sencha cmd build in server and you have no build customization, you can access the production build using this URL:
http://localhost:1841/build/production/~Insert_Application_Name~/
I have created two apps using 'Visual Studio Code' and 'node.js.' I run them using command 'npm start,' and they show in the browser. I want to build them or deploy them so they can be used by anyone. It says there to use command 'npm run build.' How to do that, and what technique you use in order to build them?
It depends on what configuration you used for building the React app. If you used create-react-app, npm run build is the correct command for building it.
If you used a different configuration (e.g. webpack), you should use the relevant command for that configuration.
Either way, deploying it will be as easy as copy/pasting the build folder's content to the server you want to host it, after running the build command.
Visual Studio Code or any other Code Editor for that matter is not relevant. You can develop, build and deploy any React app using any Code Editor you want, it's just a matter of preference.
"Building" refers to the task of preparing (transforming, minifying, compressing, etc.) all the relevant project files so that they're ready for production (assuming that your build scripts are configured to do so).
"Deploying" an app is usually a separate task that will deploy (upload) your current project build to a development platform provider like Firebase, Netlify, Azure, etc. Note that you have to register with a provider and setup a new project on their end before your deploy your project.
Which provider you use is totally up to you. Also, you have to configure your current project once you've chosen your development provider. They'll provide instructions on how to deploy your project.
On a side note, keep in mind that you can configure your own npm scripts so that they run whatever you want. More about that here
I am new to extjs and CMD. We use java as backend and extjs as frontend. So what should be the deploy policy be. CMD also does a build and java people also do a build. Should we treat its as 2 builds ?
Actually the back-end (java) and front-end (extjs) build would be separate, and these two deploy process should be independent. The package generated by sencha cmd does not include the server side.
For the full deploy you need to generate both java and extjs's package and upload to your server separately.
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
I've just used Yeoman to create an Angular project that looks great when I run grunt serve. But then I decided to view it by running http-server, and the page gets displayed without the formatting and without the images. Does anyone know why that is and if I'll run into this issue when I push it up to my web hosting server?
I discovered that I had to run grunt to build the project which fixes the references and places a distribution uglified version of the project in a dist folder. This ran just fine on my other server.
"Does anyone know why that is and if I'll run into this issue when I push it up to my web hosting server?"
Yes, you will run into this problem on your web hosting server.
grunt-serve serves the app used the setup on your local machine.
http-server mimics how a real web hosting server would evaluate your references.
My development routine is to use grunt-serve until I have a working version and then use http-server to test it out and see if it would work before I push it to my web hosting server. As #cdavid mentioned, running grunt build from your dist directory should be sufficient for general dependency issues.