• Ryaina [she/her]M
    ·
    4 years ago

    insted of running a local backend in theory, you can edit /src/env.ts

    https://git.chapo.chat/hexbear-collective/hexbear-frontend/src/branch/main/src/env.ts

    to point the api to a working backend.

    Currently, that location is always trying to point to the same url as the site but you could use either the dev site or even the live site if you really wanted to. The API doesn't care.

    pinging @vertexarray so she sees this too.

    • bottech [he/him]
      hexagon
      ·
      edit-2
      4 years ago

      When i proposed it she claimed that she doesnt recommend it as a development workflow

      • Ryaina [she/her]M
        ·
        edit-2
        4 years ago

        In general, it's probably not the best but getting a working database and local backend is a lot to ask of someone who is only working on the frontend anyway.

        We do have a dev site you can point to instead of the live site. that may be preferable so that you can test making posts and comments etc. Ask in the matrix room (linked in the sidebar) for the dev url.

        • bottech [he/him]
          hexagon
          ·
          4 years ago

          Could you show me how should i modify env.ts to make it connect with the dev site?

          • Ryaina [she/her]M
            ·
            4 years ago

            simply change the three constants that are exported host, port, and wsUri to point to the desired URL

              • Ryaina [she/her]M
                ·
                4 years ago

                ah, you may also need to edit

                the hostname function....

                https://git.chapo.chat/hexbear-collective/hexbear-frontend/src/branch/main/src/utils.ts#L1093

                • bottech [he/him]
                  hexagon
                  ·
                  4 years ago

                  I dont know exactly how to do that, could you just send me how exactly the files should look?

                • Ryaina [she/her]M
                  ·
                  4 years ago

                  Actualy, sorry

                  the API definition

                  https://git.chapo.chat/hexbear-collective/hexbear-frontend/src/branch/main/src/utils.ts#L1241