Comments (13)
This indicates that you are attempting to navigate your browser towards the websocket port/path. The good news is that this message means the websocket port is accessible.
Now, on your webserver, where did you put the client's index.html? Open the client with your browser.
For instance, this is the difference between visiting:
https://hack.chat/chat-ws hack.chat's websocket port with incorrect uri scheme
vs
https://hack.chat/index.html?marzavec hack.chat's chat client
from main.
@a7898585 Any updates on this?
from main.
I'll reopen this if you are still having trouble!
from main.
should i install lnmp first and move the docs under client to /home/wwwroot/default/ ?
and as now, I reinstall the program with script under below, seems can't work anymore
`
1
git clone https://github.com/hack-chat/main.git
2
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
3
sudo yum -y install nodejs
4
sudo yum install gcc-c++ make
5
cd main/server
6
cp /main/client/* /home/wwwroot/default //default is folder of 80 port
7
npm install pm2@latest -g
8
pm2 start server/main.js --name HackChat
9
visit 127.0.0.1:6060 failed to open it
visit 127.0.0.1 failed to open it`
I‘m new here ,and now so clear with your introduction, thanks for your kind help in advance
from main.
Before step 8, have you generated or put a config in place? Try:
cd server
npm run config
This force the server to generate a config. After that, you can continue as normal:
pm2 start main.js --name HackChat
If you are still having trouble starting the server software, you can run pm2 logs
to see if there are errors starting it.
from main.
This happens because you are using 127.0.0.1:6060
, do not use the websocket port in the URL. Instead, make it a website with httpd and move the contents of /main/client to /var/www/html. Then you would use this in the url: 127.0.0.1/?nameofchatserver
from main.
when I run the script
cd server
npm run config
it shows
`[root@li261-101 server]# npm run config
[email protected] config /root/main/server
node src/scripts/configure.js
module.js:550
throw err;
^
Error: Cannot find module 'readdir-recursive'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/root/main/server/src/managers/imports-manager.js:10:14)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] config: node src/scripts/configure.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] config script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-11-06T06_45_16_576Z-debug.log
[root@li261-101 server]# nano /root/.npm/_logs/2018-11-06T06_45_16_576Z-debug.log`
and the debug.log is
0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'config' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'preconfig', 'config', 'postconfig' ] 5 info lifecycle [email protected]~preconfig: [email protected] 6 info lifecycle [email protected]~config: [email protected] 7 verbose lifecycle [email protected]~config: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~config: PATH: /usr/lib/node_modules/npm/node_mod$ 9 verbose lifecycle [email protected]~config: CWD: /root/main/server 10 silly lifecycle [email protected]~config: Args: [ '-c', 'node src/scripts/configure$ 11 silly lifecycle [email protected]~config: Returned: code: 1 signal: null 12 info lifecycle [email protected]~config: Failed to exec config script 13 verbose stack Error: [email protected] config:
node src/scripts/configure.js13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_module$ 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_module$ 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:915:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:$ 14 verbose pkgid [email protected] 15 verbose cwd /root/main/server 16 verbose Linux 4.18.8-x86_64-linode117 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "config" 18 verbose node v8.12.0 19 verbose npm v6.4.1 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] config:
node src/scripts/configure.js22 error Exit status 1 23 error Failed at the [email protected] config script. 23 error This is probably not a problem with npm. There is likely additional logging ou$ 24 verbose exit [ 1, true ]
from main.
here is my server
http://173.255.251.101/?nameofchatserver
installed with nginx and php
nginx html path is /home/wwwroot/default/
from main.
Did you run npm install
at some point ?
from main.
yeah, i do like this
cd main/server
npm install
npm run config
still failed
from main.
I reboot the server and do it again, seems worked
thanks a lot for your kind help.
by the way, if I want to keep the chatting message ,how could I do it?
from main.
Good to hear!
You want to keep a history of the chat messages and display them when someone joins? A custom module would need to be built to handle this. The difficulty of this would vary depending on how you wanted to store the messages; in memory, or to storage with json or a database.
from main.
sure, i think this chat messages will help some guy who also new in linux
for current soft, it will destroy all the message when all vistors get out of the specified room right?
if I want to store the message into database of txt, is that possible?
from main.
Related Issues (20)
- Multiline Messages? HOT 2
- No place to input nickname HOT 13
- Are messages encrypted? HOT 1
- How to host a mirror page on public web? HOT 26
- not completely anonymous HOT 2
- Removemod user "lol" HOT 9
- Executing the join command twice can skip the CAPTCHA HOT 3
- Is there a video tutorial for building? HOT 2
- Received whisper should have its own command HOT 3
- User info should be in all events involving a user HOT 1
- Emote payload should give the text without the user mention. HOT 4
- sessionID or token? HOT 1
- Faster operation in client? HOT 1
- Admin And Senha HOT 2
- Admin HOT 1
- 请教一个问题 HOT 2
- iOS safari display HOT 9
- Mind adding a bad-word filter? HOT 2
- updateMessage bug HOT 3
- Please help step by step setup to CPanel Hosting HOT 3
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 main.