Giter Site home page Giter Site logo

beltranaceves / nerves_hub_web_issue_1337 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nerves-hub/nerves_hub_web

0.0 0.0 0.0 6.13 MB

Manage firmware updates for Nerves devices

Home Page: https://nerves-hub.org/

License: Apache License 2.0

Shell 0.05% JavaScript 1.19% Elixir 73.61% CSS 9.47% Makefile 0.05% HTML 11.05% Dockerfile 0.23% SCSS 4.35% Euphoria 0.01%

nerves_hub_web_issue_1337's Introduction

NervesHub

GitHub Actions

This is the source code for the NervesHub firmware update and device management server.

Important

This is the 2.0 development branch of NervesHub. If you have been using NervesHub prior to around April, 2023 and are not following 2.0 development, see the maint-v1.0 branch. The maint-v1.0 branch is being used in production. 2.0 development is in progress, and we don't have guides or good documentation yet. If you use the 2.0 development branch, we don't expect breaking changes, but please bear with us as we complete the 2.0 release.

Project overview and setup

Development environment setup

For best compatibility with Erlang SSL versions, we use Erlang/OTP 23.0.4. If you're coming to NervesHub without OTP 23 or earlier devices, don't worry about this. OTP 23.0.4 is difficult to install on Apple M1/M2 hardware so developing on Linux is highly recommended if you're keeping to the OTP 23.0.4 requirement.

The .tool-versions files contains the Erlang, Elixir and NodeJS versions. Install asdf-vm and run the following for quick setup:

cd nerves_hub_web

asdf plugin-add nodejs
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring # this requires gpg to be installed
asdf install

Modify the .tool-versions if you want to use a later version of Erlang.

You'll also need to install fwup and xdelta3. See the fwup installation instructions and the xdelta3 instructions.

On Debian/Ubuntu, you will also need to install the following packages:

sudo apt install inotify-tools

Local development uses the host nerves-hub.org for connections and cert validation. To properly map to your local running server, you'll need to add a host record for it:

echo "127.0.0.1 nerves-hub.org" | sudo tee -a /etc/hosts

First time application setup

  1. Setup database connection

    NervesHub currently runs with Postgres 10.7. For development, you can use a local postgres or use the configured docker image:

    Using local postgres

    • Make sure your postgres is running
    • If you need to edit the DATABASE_URL, create a .env.dev.local and .env.test.local to adjust to your local postgres connection
  2. Fetch dependencies: mix do deps.get, compile

  3. Initialize the database: mix ecto.reset

  4. Compile web assets (this only needs to be done once and requires python2 or a symlink for python3): mix assets.install

Starting the application

  • mix phx.server - start the server process
  • iex -S mix phx.server - start the server with the interactive shell

Note: The whole app may need to be compiled the first time you run this, so please be patient

Once the server is running, by default in development you can access it at http://localhost:4000

In development you can login into a pre-generated account with the username nerveshub and password nerveshub.

Running Tests

  1. Make sure you've completed your database connection setup
  2. Fetch and compile test dependencies: MIX_ENV=test mix do deps.get, compile
  3. Initialize the test databases: MIX_ENV=test mix ecto.migrate.reset
  4. Run tests: make test

nerves_hub_web_issue_1337's People

Contributors

oestrich avatar mobileoverlord avatar jjcarstens avatar fhunleth avatar dependabot[bot] avatar jlmcgehee21 avatar joshk avatar coryjewell avatar connorrigby avatar paulstatezny avatar mrjaco12 avatar beltranaceves avatar danielspofford avatar chazwatkins avatar brianberlin avatar chrisdambrosio avatar pcmarks avatar lostkobrakai avatar magreenbaum avatar pojiro avatar supersimple avatar mattludwigs avatar acrogenesis avatar tonnenpinguin avatar squaresurf avatar lawik avatar esvinson avatar grace-in-wonderland avatar hassanshaikley avatar axelson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.