ionic 2 for browser platform is not working - ionic2

I want to create an app which is able to run in mobile phone and also in browser (of course no device dependency functions). Here are the steps:
ionic start --v2 demo blank
cd demo
ionic platform add browser
ionic build browser
cd platforms/browser
php -S localhost:8000
Then open localhost:8000 in browser.
I looked through the ionicframework document. There is nothing about platform browser. Can anybody advise how I can run my app in browser? Thanks.

You don't need to add the browser platform, just run ionic serve:
ionic start --v2 demo blank
cd demo
ionic serve
Further information can be found here.

From the official documentation ionic2, its clear that the platform can either be ios or android as shown below screenshot.
So, when you want to render it in a browser, you can simply use
ionic serve

If you want to run browser platform, then cd platforms/browser/www instead of cd platforms/browser, and run local server from there.

Perform the following code at the root of the project and then the web-browser based version will be generated at /www/ folder including the sub-directories such as assets, build & index.html which is the main point of entry for the web app.
If you wanna have the app packaged as a staging or production bundle, the following command can be used, which will again generate the prod build at the same /www/location.
npm run ionic:build --prod

Related

Ionic 2 build release 404 error

I build an ionic 2 app. When I build an android debug version with ionic build android --prod the app works like a charm. But when I build the same unchanged app with ionic build android --prod --release and I sign the app and zip align it and open the app nothing works and all request give a 404 error. Anyone suggestions?
I installed the whitelist plugin and also set the meta security in the index and in the config.xml the <allow tags
Problem was the SSL certificate. The hoster forgot to add the Intermediate Certificate. On IOS this is no problem but on android it is.

Ionic 1 and Ionic 2 side by side?

I have a project built on Ionic 1 that I need to continue to develop and support. I'd also like to install Ionic RC2 and begin a new project with that. Can I run both versions of Ionic on the same development machine?
Yes you can.
If you run 'ionic-serve' in your first project folder, the default port to access it should be 8100. If you run another 'ionic-serve' in your ionic2 project folder, the default port to access should be 8101.
This way you can have your ionic1 project : localhost:8100, and your ionic2 project on localhost:8101.
The same CLI is used in both cases ;-)

sencha app build native without minify JS

I want be able to build a native app, but without minifying the JS so I can debug it later confortably.
Currently I'm executing:
sencha app build native
How can I be able to build without minifying JS files?
Thanks
For native build, you can only have testing option after upgrade to Sencha CMD 5.x, refer to
http://docs.sencha.com/cmd/5.x/cmd_upgrade_guide.html
Under Cordova / PhoneGap
"These build profiles ensure that all of the “sencha app build” command variations are equivalent to previous releases. You will notice, however, that “native” is now a build profile instead of an environment (like “testing” or “production”). This means you can now do “sencha app build native testing” which was previously not possible."
So, the command should be
sencha app build native testing
You need to use this command line instead:
sencha app build testing
That way, all JavaScript source files are bundled but not minified; and you could debug easily.
See Sencha CMD 4 documentation for more details.

How to install ffmpeg for a django app on heroku?

I'd like to use ffmpeg to extract a frame from a video to use it as a poster. This is my first time deploying an app, let alone on heroku, so I'm not sure how to install ffmpeg on the server.
I've found this build of ffmpeg with instructions to 'vendor' it into my app, and then adjust my app's configuration settings / path. What does it mean to vendor something? I have a feeling it's a rails thing, because I can't seem to find an explanation by googling.
Also, what would be the django equivalent of the instructions to run
heroku config:set PATH=bin:vendor/ffmpeg/bin:<...> -a yourapp and heroku config:set LD_LIBRARY_PATH=vendor/ffmpeg/lib:/usr/local/lib -a yourapp?
You might want to swap out the build pack for this one:
heroku config:add BUILDPACK_URL=https://github.com/integricho/heroku-buildpack-python-ffmpeg.git
The build pack is what takes your source code and builds what gets deployed to your Heroku dynos. This build pack explicitly includes ffmpeg with your app when it's built.
I have searched it for 2 day, tried everything what other users said. Then i found simple way. Just go heroku app settings. Then click add buildpack. After that popups small toolbar. Add this url:
https://github.com/kontentcore/heroku-buildpack-ffmpeg
press save changes. Then deploy your app again. You have done :)

Sencha Touch 2 Development on a Linux Server

Main Question: Is it possible to do all development for a Sencha Touch 2 web app on a Linux server?
I have a Linux server already hosting/running a decent size Django web application for the company I work for and want to build a web app for use on iPads in the field (the web app would only have a small amount of functionality for field crews). Ideally, I would be able to do all the development for this web app on the linux server, and not on my personal Windows computer.
I can't find anything that shows how one would set up such a scenario. Do I put the SDK files in my Django project directory? Would they go in an app directory within my Django directory? How do I set up the apache server to manage the Sencha Touch app?
The Sencha "Getting Started" guide shows code for what looks like a Linux type shell (they say to change to the ST directory by doing cd ~/webroot/sencha-touch-2.0.00gpl/ <- that looks like Linux command line, no?)
Anyone have any guides, information, tutorials, tips about thi