Giter Site home page Giter Site logo

Comments (18)

bensos000 avatar bensos000 commented on June 15, 2024 1

i confirm it works with hono and hono-sessions middleware https://github.com/bensos000/remultmonorepo
image

from remult.

yoni-rapoport avatar yoni-rapoport commented on June 15, 2024 1

You probably still have duplicate remult packages (two node_modules/remult folders) installed somewhere in your project tree.

While we'd like to fix remult to handle these situations better, having only one instance of the package in your tree is better.

Try deleting all remult folders and re-running bun install.

from remult.

noam-honig avatar noam-honig commented on June 15, 2024 1

Perfect.

One more thing, if you want to contribute an example project that shows bun, hono and hono-sessions - it would be a great contribution.

Simply add it to:
https://github.com/remult/remult/tree/master/examples

from remult.

noam-honig avatar noam-honig commented on June 15, 2024

I'll look into it Sunday morning

from remult.

yoni-rapoport avatar yoni-rapoport commented on June 15, 2024

This seems to be a cookie issue with bun and cookie-session. Did you try NodeJS?

from remult.

noam-honig avatar noam-honig commented on June 15, 2024

Hi @bensos000, we've looked deeper into this, and it seems that the issue here is a problem with the node js package called cookie-session that doesn't work correctly - and starts a new session on each request.

So, once you sign in, and set the user in the session, that user is not in the session in the next request. You can replace the cookie session usage with any other cookie session implementation that is popular in ban and it'll probably work

from remult.

bensos000 avatar bensos000 commented on June 15, 2024

@noam-honig thanks i will try it and confirm it if it works

from remult.

bensos000 avatar bensos000 commented on June 15, 2024

when i try to make some crud operations from the frontend it returns this
image
image

i think the payload returned from repo in the controller is not right
image

but it works when listing all todos in liveQuery

from remult.

noam-honig avatar noam-honig commented on June 15, 2024

Can you share the code?

from remult.

bensos000 avatar bensos000 commented on June 15, 2024

the code is in the same repo i have commited hono remult server with the new changes in the main branch => https://github.com/bensos000/remultmonorepo

from remult.

noam-honig avatar noam-honig commented on June 15, 2024

It seems that you have two versions of remult - one exp in the backend and one 25.5 in the shared. - causing to instances of remult to run in memory.

Can you please align both package.json

from remult.

bensos000 avatar bensos000 commented on June 15, 2024

i have updated the version of remult to exp in shared package and the same problem persist.

from remult.

bensos000 avatar bensos000 commented on June 15, 2024

yes you're right
image
i have shared now only one instance of remult throught the backend package and i confirm it works now
image

from remult.

noam-honig avatar noam-honig commented on June 15, 2024

Can you check this out in the latest version, I think it's fixed by now

from remult.

bensos000 avatar bensos000 commented on June 15, 2024

i have made 2 remult instances in the monorepo like this :
image
image
and i confirm it works now:
image

from remult.

bensos000 avatar bensos000 commented on June 15, 2024

ok i will make a pull request with an example of bun-hono-monorepo-todo

from remult.

bensos000 avatar bensos000 commented on June 15, 2024

here is the pr : #375

from remult.

noam-honig avatar noam-honig commented on June 15, 2024

Thanks - I've merged it

from remult.

Related Issues (20)

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.