If you want to submit a PR that adds this feature directly to Phoenix.LiveReloader, we will gladly accept it. Although it probably needs to be made a bit more general:
plug Phoenix.LiveReloader, exclude: ["/dashboard", "/foo/bar"]
If you want to submit a PR that adds this feature directly to Phoenix.LiveReloader, we will gladly accept it. Although it probably needs to be made a bit more general:
plug Phoenix.LiveReloader, exclude: ["/dashboard", "/foo/bar"]
The app is used by non-live routes.
Ah my bad, didnāt realize it was a default. I assumed I would see a config that states that somewhere and was surprised to not find it.
I was mainly asking because when I tried the ālive generator it wouldnāt work with the flag for no webpack.
I would assume itās because the generator is not setup to produce the correct code to include the missing packages and its assumed you will be doing it yourself since its not the default.
I just visited the Phoenix Framework website. I really like the new design
Iām trying to create a new Phoenix app, but Iām not lucky with the ānpm installā step:
npm install
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.12: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
> node-sass@4.14.0 install /usr/src/hello/assets/node_modules/node-sass
> node scripts/install.js
internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module '../lib/extensions'
Require stack:
- /usr/src/hello/assets/node_modules/node-sass/scripts/install.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/usr/src/hello/assets/node_modules/node-sass/scripts/install.js:9:10)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/src/hello/assets/node_modules/node-sass/scripts/install.js' ]
}
What should i do?
/edit: nevermind, worked now after using node 10 instead of 12
Is there any way to get HTTP requests over time stats? on Phoenix Live Dashboard?
I want to get stats of my application, how many POST request have been being made. to a specific Address over time.
LiveDashboard is (at least at the moment) live. If you need aggregation over time youāll need to look at persisting the metrics to postgres or via statsd to a more dedicated db. Luckily with telemetry it should be simple to use the same set of events for both usecases.
Great news. Our dear authors, please update your books!
then question falls on:
how to add http request stats to Telemetry and then to dashboard to show it?
Oh, my point was intended for something different. You can use telemetryās data to be put into a metrics db and something like grafana to read it from there. For historical data itās not just about showing a graph, but also a lot about querying/joining data, which are things LiveDashboard doesnāt do right now. Iām not sure how much of this might be planed though.
Very Good, thank you.
What is the link for 1.4 to 1.5 upgrade guide?
Maybe thisā¦
if anyone has done an upgrade from 1.4.x to 1.5 and is able to use the new phx.gen.live
functionality Iād love to read what you had to do. From what I understand (https://github.com/phoenixframework/phoenix/issues/3774) the generator uses functions that are created by having the --live
option passed to phx.new
.
Iām about to start down the pathway of diffing, or maybe just migrating over some of what I have since this particular app isnāt that big but already has some prototyping cruft. If anyone has already done it and wants to save me and others some time, please share
In addition to the upgrade gist you may want to look at phoenix diff:
It would be super awesome if someone contributed a feature that allowed you to optionally pass the --live
flag to a given version on phoenixdiff.org.
This code
<!-- View Specific Javascript -->
<%= render_existing @view_module, "_javascript.html", assigns %>
Use to work in my layouts for doing view specific javascript.
What is the recommended way to do that now with the new @inner_content?
You can use view_module(conn)
and view_template(conn)
to access these values from the template.