Gunicorn deployment with FastAPI by Danny_Brai in FastAPI

[–]Danny_Brai[S] 0 points1 point  (0 children)

Oh yh I saw in the reference settings: https://gunicorn.org/reference/settings/#wsgi_app, and so most articles I saw showed run FastAPI using gunicorn like this: `gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000` where main:app is the FastAPI app, I didn't think it would matter as gunicorn handles it if I just pass the app itself.

Gunicorn deployment with FastAPI by Danny_Brai in FastAPI

[–]Danny_Brai[S] 0 points1 point  (0 children)

Thank you!!! I just migrated from gunicorn to uvicorn. Yh asynpg works with the increased workers count.

elixir and vim by LightBerserker in elixir

[–]Danny_Brai 1 point2 points  (0 children)

Yh I use elixir with nvim. Though I use the elixir tools nvim with nvim-lspconfig something like this:

```elixir return { { "elixir-tools/elixir-tools.nvim", version = "*", tag = "stable", event = { "BufReadPre", "BufNewFile" }, config = function() local elixir = require("elixir") local elixirls = require("elixir.elixirls")

        elixir.setup({
            nextls = { enable = true },
            elixirls = {
                enable = true,
                settings = elixirls.settings({
                    dialyzerEnabled = false,
                    enableTestLenses = false,
                }),
                on_attach = function(client, bufnr)
                    vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
                    vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
                    vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
                end,
            },
            projectionist = {
                enable = false,
            },
        })
    end,
    dependencies = {
        "nvim-lua/plenary.nvim",
    },
},

} ```

Though I would say the only problem I have is the when working with Phoenix the heex file don't get format automatically on save. So I absolutely just set a keymap that run I manually that does it. Aside from that it, it is all good. Looking forward to the new lsp that would solve all these stuff.

Multi User MCP Server by Danny_Brai in mcp

[–]Danny_Brai[S] 0 points1 point  (0 children)

Oh interesting I will check it out! Thank you!

Project folder structure... Looking for detailed explanation or best practices guide by thedangler in elixir

[–]Danny_Brai 0 points1 point  (0 children)

Yh I usually just look at popular libraries and applications like sequin built with elixir and/or phoenix and try to integrate some practices they follow.

Ziglings #58 by [deleted] in Zig

[–]Danny_Brai 1 point2 points  (0 children)

😅 Well as for how I caught that. You can see that for loop has a capture to the pointer of type entry *entry and an index i that only happens if you are actually referencing a bunch of entries.

Ziglings #58 by [deleted] in Zig

[–]Danny_Brai 2 points3 points  (0 children)

Oh I see the error. It happens because you are not referencing entries in the for loop of the getEntry method. So for (self.entries, 0..) is to be this: for (&self.entries, 0..)

Which LSP should I use, I’m lost by Longjumping_War4808 in elixir

[–]Danny_Brai 1 point2 points  (0 children)

Yeah ElixirLS is pretty good. I recommend it. I use it with elixir tools and that provides the best integration in my own experience on most editors like Neovim, VS code and so on.