teatimes

teatimes

Run natively/local

I have the last years worked on an application written mainly in Elixir and Phoenix, and recently added Elm frontend. Because of the sensitivity of the data (a users bank transactions and financial information), and because it would be nice to not have to think about server costs until I might have customers on it, I have tried to find an easy way to run it locally/native for now, also for users that are non-technical.

I develope it on Manjaro, so there I could use a simple script to install everything, start the backend and then open an electron window by using nativefier. The problem is mainly on windows, both in making a package with what I need and make it all run.

I tried building it with distillery and run it in foreground on windows, but I only got error messages. I think it can have something to do with having Erlang 21 and Elixir 1.18 with Erlang 20 as opt on Windows, while I have Elixir 1.18 with Erlang 21 as opt on Manjaro. But I did not figure out how to upgrade the opt Erlang on Windows.

I know this is not the “right way” to use an Elixir/Phoenix application, but I would assume there is a way to make it work, at least for now so that I can test it on people without thinking about server costs or security.

Does anybody have any tips how I can make it run locally/native on Windows?

Most Liked

NobbZ

NobbZ

Docker is probably not a solution for the non-tech people. Especially docker for windows.

12433412

12433412

Just a few things to consider (sorry for not answering your question):

  • thick client requires maintenance on machines that are out of your control
  • thick client is a pain to upgrade (you have to keep at least some backwards compatibility)
  • server cost is a temporary problem that will go away, the decisions stay
  • webapps are precisely the thing for non-technical users due to lack of installation and configuration on user side
  • you need to transmit the sensitive information to the server either way regardless if they come from a native app or browser
  • you are likely to keep the web interface as well having two products to maintain in the end
xlphs

xlphs

I use exrm to release as Windows Service, I have tried distillery, it doesn’t work. After release, strip your beam files of debug symbols, and edit the bat script as necessary, eg add new firewall rule to open up ports. I use InnoSetup to ship the entire release (elixir server plus a local GUI app), which also takes care of calling the install/uninstall script.

A small problem with this is starting up the database, for now I’m using sqlite so the entire service is standalone. But I think there’s a way to configure windows service dependency so you ask postgresql/etc to start first, or just have the service do delayed startup.

Last Post!

teatimes

teatimes

I have wrapped the frontend in Electron trough nativelify, but the problem is the backend. But I will take a look at the thread!

Where Next?

Popular in Questions Top

New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New

We're in Beta

About us Mission Statement