Comments (6)
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.
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.
Thanks, i will give it a try!
from chat.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat.