
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
New Version Available
Thanks to the help of @lucamug and others a new version of elm-live is available! With the following changes:

To use the new version of elm-live while it is in alpha you can run one of the following commands:
# Globally for a user:
npm install --global elm elm-live@next
# …or locally for a project:
npm install --save-dev elm elm-live@next
Otherwise, to use the latest stable version:
# Globally for a user:
npm install --global elm elm-live
# …or locally for a project:
npm install --save-dev elm elm-live
# Globally for a user:
npm install --global elm elm-live@prev
# …or locally for a project:
npm install --save-dev elm elm-live@prev
If you’d rather bring your own global elm, npm install --global elm-live will do.
| Node Version | elm-live Tag Version |
|---|---|
| 4 | <= v2.6.1 |
| 6 | >= v2.6.2 && < v4.0.0 |
| 10 | >= v4.0.0 |
elm-live [...<options>] [--] ...<elm make args>
elm-live --help
First, we spawn elm make with the elm make args you’ve given.
When the build is ready, we start a static HTTP server in the current directory. We inject a live reload snippet into every HTML file we serve. Every time a static file has changed, we’ll reload your app in all browsers you’ve opened it with. (Mobile and IE included!)
We also watch all *.elm files in the current directory and its subdirectories. Whenever you change, add or remove one of them, we’ll rebuild your program and reload the page.
-e, --path-to-elm=PATHAn absolute or relative path to elm. If you’ve installed elm-platform locally with npm (npm install --save-dev elm), you’ll likely want to set this to node_modules/.bin/elm. Default: elm.
-p, --port=PORTSet the port to start the server at. If the port is taken, we’ll use the next available one. PORT should be a valid port number. Default: 8000.
-h, --host=HOSTSet the host interface to attach the server to. Default: localhost.
-S, --sslStart an https server instead of http. Default: false.
-S, --ssl-cert=PATHPass in a relative path to your own ssl cert. Default: false.
-S, --ssl-key=PATHPass in a relative path to your own ssl key. Default: false.
-x, --proxy-prefix=PREFIXProxy requests to paths starting with PREFIX to another server. Requires --proxy-host and should be a string like /api. Defaults to not proxying
-y, --proxy-host=HOSTProxy requests to another server running at HOST. Requires --proxy-prefix and should be a full URL, eg. http://localhost:9000. Defaults to not proxying
-d, --dir=PATHThe base for static content. Default: ..
-s, --start-page=PATHA custom html file to serve other than the default index.html.
-u, --pushstateServe index.html on 404 errors. This lets us use client-side routing in Elm. For instance, we can have a URL like http://localhost:8000/account get handled by the Elm navigation package instead of failing with a 404 error.
-H, --hotTurn on hot module reloading.
-o, --openWe’ll open the app in your default browser as soon as the server is up.
-v, --verboseLog more stuff!
--no-reloadTurn off live reload. This means you will need to manual reload your website after each build to see the changes.
--no-serverTurn off the server for elm-live. This is useful when you are using elm inside of another development ecosystem.
--helpYou’re looking at it.
This command will start the server at https://localhost:8000 and compile your elm code to an index.html file in the folder you are running the command from. Note: the --open flag will open the page in the browser for you.
$ elm-live src/Main.elm --open
This command tells elm make to compile your elm code to a file named elm.js in the folder you are running the command from. From there you just need to include the script in default file of index.html as shown in the Elm guide here: https://guide.elm-lang.org/interop/
$ elm-live src/Main.elm --open -- --output=elm.js
To specify an HTML file other than the default, you can use the --start-page flag. This is an easy way to avoid elm make accidentally overriding your custom HTML.
$ elm-live src/Main.elm --open --start-page=custom.html -- --output=elm.js
This command tells the server to always serve up the index.html no matter what the URL is. This allows Elm to handle the routing clientside. Note: this option is a must when you are using Browser.Navigation
$ elm-live src/Main.elm --open --pushstate
All possible elm make flags are available in elm-live. You just need to make sure they are passed after -- in the command. So the command below shows how to turn on the debugger in elm make.
elm-live src/Main.elm --open -- --debug
If you’re seeing one of these:
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
make sure you’re running on node 6+. If you can’t upgrade, consider transpiling source/elm-live.js to ES5.
By the way, yarn should be warning you about installing incompatible packages. To get the same behavior in npm, set the engine-strict flag.
Huge shoutout to the creator Tomek Wiszniewski!
Many thanks to Evan Czaplicki, the creator of Elm, for the Elm Compiler – the most brilliant language compiler the world has ever seen! Without elm make, elm-live would be a car without an engine.
Many thanks to Matt DesLauriers for the wonderful budo. That’s what does the heavy lifting on the static server side.
Warm thanks to our amazing contributors! Credits to Brian for making Windows support possible, Kurt for allowing a configurable --host and Josh for his work on enabling client-side navigation. Thanks to Ryan batch updates are nice and fast. Kudos to Mathieu, Rémy and Nicolas for making the developer experience smoother and to Gabriel for the --before-build option. Many thanks to Noah for making sure elm-live works smoothly with elm-test. Thanks to Darren for finding and fixing the bug with --port options on the 3.0.0 release.
FAQs
A flexible dev server for Elm. Live reload included!
The npm package elm-live receives a total of 564 weekly downloads. As such, elm-live popularity was classified as not popular.
We found that elm-live demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.