alecStewart1

alecStewart1

Phoenix + Svelte + NimblePublisher

Hello again!

So I find myself a little overwhelmed and confused.

I don’t want to make a CRUD application, because, well, I’m not really doing much of CRUD operations outside of getting posts.

How I want to structure is

  1. I have posts to put on a site in say priv/posts
  2. Those posts will be processed with NimbePublisher
  3. What has been processed will inserted into the Ecto database
    • The schema will look sorta like (what I would be passing to mix phx.gen.scheme Blog Post posts)
      id:uuid
      date:date
      title:string
      description:string
      tags:array:string
      body:string
      
  4. The frontend will make a GET request for either all posts or a specific post
    • The frontend is in Svelte
    • It’d be nice to maybe make use of svelte-routing

There is this guide to using Svelte with Phoenix, and there’s this post as well. Though I’m not certain if this is the way you’re suppose to do this.

Also, in the Elixir School link for NimblePublisher there’s the use of --no-ecto, and I’m curious as to if that would be better in this situation. Though of course that changes how I get the data from the processed markdown.

Thanks for any advice you may give!

First Post!

KekKekington

KekKekington

I haven’t used NimblePublisher but it seems like it’s not meant to do what you are trying to do. It seems to transform .md files and show them as pages, with Phoenix’s templates convert them to Elixir data structures.

Just to clarify, are you going to use .md files to import your posts or is the user going to be submitting the posts themselves?

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
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
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
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
dotdotdotPaul
Okay, I’m having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I’m sure I’...
New

Other popular topics Top

marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
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
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement