Socket.io path

105 views
Skip to first unread message

Michael Reach

unread,
Sep 24, 2020, 4:29:12 PM9/24/20
to Enterprise Web Developer Community
For qewd-up Native, front-end vue-cli using vue-qewd, I've been trying to modify the socket.io path from the client to include something below the web server. I.e., autosmile.psmile.org/qewd/... instead of just autosmile.psmile.org/
Here in https://socket.io/docs/client-api/ they call this setting the 'path' variable.
From the qewd-client code, I had the impression that changing QEWD to
var qewd = QEWD({
  application: 'smile', // application name
  log: true,
  url: '/',
  io_path: '/qewd',
  io // use WebSocket communication
})
ought to work, but I'm not seeing any effect.
How should it be done?
Thanks!

Rob Tweed

unread,
Sep 25, 2020, 12:14:41 PM9/25/20
to Enterprise Web Developer Community
So this is to use in a Native mobile app?

And can you confirm you're using the new qewd-client rather than the older ewd-client module?

Are you using Ward deBacker's Vue wrapper around the QEWD Client?

Rob
 

--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/enterprise-web-developer-community/46679377-79f9-4656-a8cc-fea709f8ecdfn%40googlegroups.com.


--
Rob Tweed
Director, M/Gateway Developments Ltd
http://www.mgateway.com

Michael Reach

unread,
Sep 26, 2020, 8:59:04 PM9/26/20
to Enterprise Web Developer Community
Yes, I'm using Ward Backer's vue-qewd wrapper. It's not a mobile app, but it's using qewd-up installed in the Native mode.
Backend package.json:
{
  "name": "qewd-up",
  "version": "1.0.0",
  "description": "Automated QEWD Builder",
  "author": "Rob Tweed <rtw...@mgateway.com>",
  "scripts": {
    "start": "node node_modules/qewd/up/run_native"
  },
  "dependencies": {
    "crypto": "^1.0.1",
    "dotenv": "^8.2.0",
    "forever-monitor": "^2.0.0",
    "multer": "^1.4.2",
    "qewd": "^2.51.2",
    "qewd-transform-json": "",
    "socket.io-client": "^2.3.0",
    "vue-qewd": "^2.0.1",
    "vue-router": "^3.4.3"
  },
  "devDependencies": {
    "jquery": "^3.5.1"
  }
}

Front-end vue-cli package.json
{
  "name": "irs",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "builddev": "vue-cli-service build --mode devprod",
    "buildprod": "vue-cli-service build --mode production"
  },
  "dependencies": {
    "axios": "^0.20.0",
    "core-js": "^3.6.5",
    "sass": "^1.26.10",
    "sass-loader": "^10.0.1",
    "socket.io-client": "^2.3.0",
    "vee-validate": "^3.3.9",
    "vue": "^2.6.11",
    "vue-qewd": "^2.0.1"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "vue-template-compiler": "^2.6.11"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}

Michael Reach

Michael Reach

unread,
Sep 26, 2020, 10:24:36 PM9/26/20
to Enterprise Web Developer Community
The front-end lives on a different server, I should have mentioned.
Michael

wdbacker

unread,
Sep 28, 2020, 4:14:33 AM9/28/20
to Enterprise Web Developer Community
Hi Michael,

I've been working last Saturday on Vue.js integration with the new qewd-client and I got everything working with some changes to the qewd-client code for use with @vue/cli. I'm testing now with a Vue.js 2.x app (and also with the latest Vue.js 3.x version, this one is already tested and working perfectly).

I'll publish links to the examples on my GitHub asap!

HTH,
Ward

wdbacker

unread,
Sep 29, 2020, 10:26:45 AM9/29/20
to Enterprise Web Developer Community
If you want to check out how to write Vue.js 2.x and 3.x apps using the new qewd-client module, I created two example repo's:

With all of this documented in the README's, you should get a Vue.js app get up & running easily.

*** Important: to test this in your environment now, you'll need to add the forked version from https://github.com/wdbacker/qewd-client manually to your node_modules folder of your Vue.js app.
The qewd-client module will be published in the coming days on npm too, making this step not needed anymore afterwards.

HTH,
Ward

Michael Reach

unread,
Sep 29, 2020, 10:12:01 PM9/29/20
to Enterprise Web Developer Community
Thanks, Ward!
Michael

wdbacker

unread,
Oct 3, 2020, 7:18:30 AM10/3/20
to Enterprise Web Developer Community
I brought together all examples in one place: https://github.com/wdbacker/qewd-howtos

You'll notice the instructions for setting up a reverse proxy to a QEWD-Up/QEWD.js server on a path/location. The qewd-client and qewd module support this kind of setup now when you update to the latest version. You'll see an example at the bottom of the instructions how to start a qewd-client connecting to a proxied QEWD-Up server from a Vue.js app. You can apply this easily to the Vue 2 QEWD hello-world example app.

HTH,
Ward

Faisal

unread,
Oct 5, 2020, 8:06:26 AM10/5/20
to Enterprise Web Developer Community
Hello, If anybody wants to use Vue.js/Nuxt.js with ewd.js (older version of qewd) then can try vue-ewd https://github.com/faisalsami/vue-ewd (i updated vue-qewd code so that it can be used for ewdjs). Thnaks.
Reply all
Reply to author
Forward
0 new messages