Livereload with ember-cli - ember-cli

I'm trying to setup livereload in a brand new ember app created with ember-cli
after using
ember new app
and setting up the .ember-cli file:
{
"port": 9000,
"liveReload": true
}
I've launched
ember server
in the console I can see:
version: 0.0.46
Livereload server on port 40529
Serving on http://0.0.0.0:9000
Build successful - 1939ms.
but
the browser does not open automatically (I have to manually navigate to localhost:9000)
the browser does not refresh after updating for example application.hbs template
(I use latest chrome)
There is something I'm missing?

I'm not sure what was going on in September 2014, but the live-reload is on by default in the current builds. You definitely need to open your browser yourself though. Most commonly, users forget to npm sass or stylus and wonder why it's not working - but that is another issue.

Related

VS Code: How to launch Edge/Chrome in a debug session on an external site while redirecting js files to local webpack bundles

I'm developing a small JavaScript app for an external site, example.com. I'm using Webpack 5 to bundle my application and ship it as a single js file that will be hosted at example.com/app.js. I'm using Webpack's devServer config options to host my local files and recompile on changes. example.com is not something I can run locally, so I need to:
From within VS Code, launch Edge in a debug session targeting example.com
I can do this via launch config vscode-edge-devtools.debug but cannot figure out how to do this using type msedge. It always seems to want localhost as the URL
That running instance of Edge should listen for calls to /app.js, and redirect those requests to
C:\Code\app.js
I can use the Requestly extension to do this but wanted to see if it could be done natively. I tried using overrides as well
Changes to my local app.js need to reload example.com, or preferably, hot-reload just the JS bundle, though I'm not sure this is possible
Webpack is hosting these at localhost:8080 and that reloads successfully on build, but I need this to happen for example.com

Local Development Server for Lightning Web Components

I'm trying to set a Local Development Server for Lightning Web Components according to this link but when I try to install the plugin #salesforce/lwc-dev-server I get this error message :
Code: ShellParseError
and a .js file named npm-cli.js opens in my editor with this content:
#!/usr/bin/env node
require('../lib/cli.js')(process)
Anyone knows what to do? Thanks in advance.
In general, the local development for Lightning Web Components still has beta status: Local Development (Beta)
However, even the beta version can now be used relatively reliably. To set up local development you only need to authorize an org and install the development server. This allows you to develop locally without the need to push your components to an org first.
The local development server and its configuration are provided by a Salesforce CLI plugin. Before you install the plugin make sure you are using the latest Salesforce CLI version by running:
sfdx update
Then the lwc-dev-server plugin can be installed as follows:
sfdx plugins:install #salesforce/lwc-dev-server
After installing the plugin, to start the server on http://localhost:3333 and access all components of the project just run:
sfdx force:lightning:lwc:start
There is even a short official guide on how to set it up: Set Up LWC Local Development

How do I test out production confluence cloud plugin?

I am able to test out my confluence cloud plugin with the base url set to:
{{localBaseUrl}}
This loads the plugin fine on my confluence test environment that's hosted on my_project.atlassian.net...
When I update the baseUrl in my atlassian-connect.json it's unable to load the same plugin when I run npm start and have the plugin files uploaded to the S3 account (It throws this: Tunnel 0e6e0931.ngrok.io not found). it's able to create the marketplace listing though.. How do I test my plugin to make sure it'll work in production?
Turns out if I create a private listing, I can view the app page, grab the install url and install via UPM. This will verify if the production app works before going live.

Debugging a GWT application in a remote environment

I have deployed my GWT application to its target environment (i.e. compiled and copied the war directory contents to the target device's /var/www) and some parts of it are not working. I understand that I can debug my local instance of the GWT app as if it were running in the target environment, by opening the deployed GWT App URL and adding gwt.codesvr URL parameter to it, like this:
http://deployment_host/gwtapp.html?gwt.codesvr=localhost:9997
I get
Plugin failed to connect to Development Mode server at localhost:9997
Follow the underlying troubleshooting instructions
My Chrome browser is running on the same machine as Eclipse, so localhost above should be ok. Just to make sure, I've added -bindAddress 0.0.0.0 in the Run/Debug configuration in Eclipse and tried with my external IP/hostname, with no change, except that the error message is updated accordingly. What am I doing wrong?
If I replace deployment_host with localhost above everything works fine, but it's of no use to me to debug locally. (There is some Proxy and ReverseProxy-ing going on in the local Apache, so I do not need the 8888 port when running locally, but this should be unrelated)
Questions Debugging GWT applications outside of dev mode? and Debug GWT application in a remote browser are related but do not help.
If you are using chrome, look in the address bar at the right for a grey GWT icon. In any other browser, you would see a popup message confirming that you want to debug, but in Chrome this apparently isn't possible.
Click the icon, and it will ask you to whitelist this site as allowed to run Java locally on your computer. After you whitelist it, it should run correctly.
Along the same lines as the answer above Ive just had some success restarting the extension helped (but restarting browser hadnt)
Just enable and disable it in :
chrome://chrome/extensions/
Good luck! It's the only thing wrong with GWT imho...

plugin failed to connect to development mode server at 127.0.0.1

I am using GWT 2.3.0 as a plugin for Eclipse to develop a web based application
Unfortunately, when I try to run my application I get:
plugin failed to connect to developer mode server at 127.0.0.1:9997
and
onModuleLoad() threw an exception :java.lang.reflect.InvocationTargetException
I have installed the Gwt developer plugin for Google Chrome and every time I run my project it requires me to install this plugin and restart the browser, after which I get the above mentioned problem.
You can solve this issue by:
Right click on your web project -> Run as -> Run configurations.
Select 'Server' and 'GWT' tabs respectively and check on 'Automatically select an unused port'
Clear Cache from your Chrome browser (do the same on Firefox if you are using Firefox, remember the GWT plugin is not available on the latest Firefox versions, 3-10 I believe).
Run and hopefully enjoy.
I know it's an old question but,
I ran into the same problem today.
For some reason (quite unknown to me) deleting the ":9997" from the end of the address fixed it, and the application came up nicely.
Hope this helps.
Look at http://notepad2.blogspot.com/2010/12/debug-google-web-toolkit-applications.html for a step by step instruction on how to set up chrome, particularly the last part on how to setup the plugin using an external web server.
For the first problem that you faced : plugin failed to connect to developer mode server at 127.0.0.1:9997 , just clear your browser cache and try once again.
Just happend to me today too, and I've managed to fix it:
It turns out that the set of the GWT modules to be loaded is configureable; by referring to one of the GWT html's from the browser, it appears I was actually trying to connect to a page under a module that has been removed from the run-config's modules list. So, one more thing to do is to verify the list's content:
In eclipse: "Run Configurations" > Web Application > (your app) > GWT tab > Available Modules
In IntelliJ (that's what I've used): Edit Configurations > (select your GWT config) > GWT Modules to load
The GWT Plugin may be need to restarted
First Clear Browser cash
Second : try the following on chrome browser
-
open : chrome://extensions/
Go to : GWT Developer Plugin
uncheck the Enabled box
check the Enabled box
Open URL again and have fun :)
I fixed the issue by only clearing the browser cache. I am working with Firefox 15.0.1