teatimes

teatimes

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?

Showing Posts 1 to 8

Nicd

Nicd

Firstly note that a Distillery release must be built on the same architecture and OS as the target. So to run a release on Windows, you will need to build it on Windows.

pedromvieira

pedromvieira

You can also have a docker image and run it universally.

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
teatimes

teatimes OP

I agree that in the long run, a having it on the web will be the most “optimal” solution, or rewriting it to a native application. But for now, it would be great if I could run it native. With that, I meant also having the database for each user locally on their computer. Since it would be financial information, I don’t feel competent enough at the moment to assure the potential users that the application is secure enough for that kind of information.

12433412

12433412

Seems the best approach would be to wrap your webapp with an in-app/embedded browser. I have little experience in this though… This thread might be worth a look…

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.

teatimes

teatimes OP

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

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
subsaharancoder
I’ve followed the Phoenix LiveView file upload code here Uploads — Phoenix LiveView v1.0.0-rc.7 and so far everything works just fine wit...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews