Giter VIP home page Giter VIP logo

beaconcms / beacon_demo Goto Github PK

View Code? Open in Web Editor NEW
38.0 8.0 13.0 467 KB

Sample application running Beacon, a open-source content management system (CMS) built with Phoenix LiveView.

Home Page: https://beaconcms.org

License: MIT License

Elixir 21.59% CSS 0.04% JavaScript 71.75% HTML 5.83% Dockerfile 0.68% Shell 0.07% Batchfile 0.04%
cms phoenix-liveview elixir-lang phoenix-framework elixir phoenix

beacon_demo's Introduction

BeaconCMS Demo

Sample application to showcase beacon features. Follow the readme to get started:

Run a database

Postgres is configured by default but you may change the adapter in lib/beacon_demo/repo.ex.

Adjust database connection

In config/dev.exs adjust the following repo config to fit your local environment:

config :beacon_demo, BeaconDemo.Repo, ...

Setup

Run setup to install dependencies and setup initial data:

mix setup

Run server

mix phx.server

Change seeds data (optional)

Layouts and pages are defined in priv/repo/seeds/beacon.exs. That data will be seeded on mix setup and you can manage it using the admin interface, but feel free to edit as you wish and run mix ecto.reset to drop the database and recreate all data.

Demo

Visit some sample pages:

Exploring

Checkout the Beacon guides for more.

beacon_demo's People

Contributors

dvslabs avatar leandrocp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beacon_demo's Issues

Mix setup on macOS leads to "role "postgres" does not exist"

Setup

  • macOS Ventura 13.4
  • Elixir 1.14.4, Erlang/OTP 25 (erts-13.2.2)
  • cmark-gfm (0.29.0.gfm.13) compiled and installed

Issue
I tried to setup the project as described with $ mix setup and get the following log output.

Log output

`12:19:57.826 [debug] Downloading tailwind from https://github.com/tailwindlabs/tailwindcss/releases/download/v3.1.8/tailwindcss-macos-arm64

12:20:03.508 [debug] Downloading esbuild from https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.41.tgz

12:20:03.901 [error] Postgrex.Protocol (#PID<0.616.0>) failed to connect: ** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) role "postgres" does not exist

12:20:03.907 [error] Postgrex.Protocol (#PID<0.621.0>) failed to connect: ** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) role "postgres" does not exist
** (Mix) The database for BeaconDemo.Repo couldn't be created: killed`

Image not found

I'm trying to evaluate if I can use BeaconCMS, so I tried to run this demo.
Clone, mix deps.get, mix ecto.setup, mix phx.server .

The issue that I'm facing is the it can't found the narwin.webp file, and also getting the same error when trying to upload new media. The error is:

KeyError at GET /admin/demo/media_library/upload
key :agent not found in: %{
  socket: #Phoenix.LiveView.Socket< ....

The weird thing is that down the page, it really shows that narwin.webp was loaded indeed:

streams: %{
    assets: %Phoenix.LiveView.LiveStream{
      name: :assets,
      dom_id: #Function<1.120097161/1 in Beacon.LiveAdmin.MediaLibraryLive.Index.mount/3>,
      ref: "0",
      inserts: [
        {"4765ae81-e575-4c24-8813-7a60b093e922-e905343b-ec93-4080-90dd-be0834f40511",
         -1,
         %Beacon.MediaLibrary.Asset{
           __meta__: #Ecto.Schema.Metadata<:loaded, "beacon_assets">,
           id: "e905343b-ec93-4080-90dd-be0834f40511",
           site: :demo,
           file_name: "narwin.webp",
           file_body: <<82, 73, 70, 70, 24, 180, 0, 0, 87, 69, 66, 80, 86, 80,

Also, the file is not displayed on the entry page, just a placeholder with error.

What am I doing wrong?

Thanks!

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.