Giter VIP home page Giter VIP logo

Comments (6)

tegioz avatar tegioz commented on June 1, 2024

Hi @Schrims

Something like this should work (I haven't tested it):

curl -H 'Content-Type: application/json' -X POST -d '{"msg": "Hello!"}' http://localhost:8888/api/broadcast/

from chat.

tegioz avatar tegioz commented on June 1, 2024

Another option would be to use a browser extension (like Postman -there are plenty of options-) to talk to the API from your browser.

from chat.

Schrims avatar Schrims commented on June 1, 2024

Thanks, i will give it a try!

from chat.

Schrims avatar Schrims commented on June 1, 2024

if i execute your command - i got the following error message
but i will take a look at it!

TypeError: sanitize is not a function
at sanitizeMessage (/Workspace/chat/chatServer.js:64:32)
at callbacks (/Workspace/chat/node_modules/express/lib/router/index.js:164:37)
at requireAuthentication (/Workspace/chat/chatServer.js:58:5)
at callbacks (/Workspace/chat/node_modules/express/lib/router/index.js:164:37)
at param (/Workspace/chat/node_modules/express/lib/router/index.js:138:11)
at pass (/Workspace/chat/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/Workspace/chat/node_modules/express/lib/router/index.js:173:5)
at Object.router (/Workspace/chat/node_modules/express/lib/router/index.js:33:10)
at next (/Workspace/chat/node_modules/connect/lib/proto.js:190:15)
at Object.staticMiddleware [as handle] (/Workspace/chat/node_modules/connect/lib/middleware/static.js:55

from chat.

tegioz avatar tegioz commented on June 1, 2024

Hi @Schrims

Just pushed a couple of changes that should fix the issues you have. This project is quite old and some updates in dependencies have broken it over time (will fix the versions soon though). I hadn't touch it in a while, was fun :) There may be more things broken, so if you find more issues and want to play with it a bit pull requests are welcome.

from chat.

Schrims avatar Schrims commented on June 1, 2024

Thanks @tegioz for your support!
It's now working with your changes and the given command.

I'll play with it and keep you informed.

THANKS!

from chat.

Related Issues (9)

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.