Skip to content

Chat example with UI, WS, and HTTP#6

Merged
willbach merged 2 commits intomasterfrom
wg/ui
Dec 22, 2023
Merged

Chat example with UI, WS, and HTTP#6
willbach merged 2 commits intomasterfrom
wg/ui

Conversation

@willbach
Copy link
Copy Markdown
Contributor

@willbach willbach commented Dec 22, 2023

This PR adds a simple UI to the chat example for a full web app served by a node. The app includes both two-way websocket calls and HTTP requests (GET & POST) on both frontend and backend.

@nick1udwig nick1udwig self-requested a review December 22, 2023 16:43
@nick1udwig
Copy link
Copy Markdown
Member

I get

$ uqdev build-with-ui
Compiling Uqbar process in "/home/nick/git/uqbar-v2/uqdev/foo/foo"...
   Compiling foo v0.1.0 (/home/nick/git/uqbar-v2/uqdev/foo/foo)
    Finished release [optimized] target(s) in 2.24s
Done compiling WASM project in "/home/nick/git/uqbar-v2/uqdev/foo/foo".
Building UI in "/home/nick/git/uqbar-v2/uqdev/foo/ui"...
UI directory found, running npm install...

changed 1 package, and audited 224 packages in 456ms

42 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Running npm run build:copy...

> ui-template@0.0.0 build:copy
> npm run build && npm run copy


> ui-template@0.0.0 build
> tsc && vite build

src/App.tsx:4:31 - error TS2307: Cannot find module '@uqbar/client-encryptor-api' or its corresponding type declarations.

4 import UqbarEncryptorApi from "@uqbar/client-encryptor-api";
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in src/App.tsx:4

Error: Command failed

after updating my node and npm versions

Copy link
Copy Markdown
Member

@nick1udwig nick1udwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, this is not currently working for me. Added some comments as well.

Comment thread src/main.rs
Comment thread src/new/mod.rs
Comment thread src/new/templates/rust/chat/chat/src/lib.rs Outdated
Comment thread src/new/templates/rust/chat/chat/src/lib.rs Outdated
Copy link
Copy Markdown
Member

@nick1udwig nick1udwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work 👍

@willbach willbach merged commit 1b7ce85 into master Dec 22, 2023
@willbach willbach deleted the wg/ui branch December 22, 2023 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants