tinode / chat

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots
GNU General Public License v3.0
12.06k stars 1.88k forks source link

code: 404 #26

Closed k0fi closed 7 years ago

k0fi commented 7 years ago

Hello, I followed the instructions but could not see the web interface. I run /home/me/go/bin/server -config=/home/me/go/src/github.com/tinode/chat/server/tinode.conf -static_data=/home/me/Desktop/example-react-js/

But when I visit:

http://localhost:6060/home/me/Desktop/example-react-js/

I get:

{
ctrl: {
code: 404,
text: "not found",
ts: "2017-09-25T08:55:41.132Z"
}
}

I have extracted the react files and to example-react-js and copied tinode.js there.

The server output in the terminal:

me@pc:~/go$ /home/me/go/bin/server -config=/home/me/go/src/github.com/tinode/chat/server/tinode.conf -static_data=/home/me/Desktop/example-react-js
2017/09/25 10:55:22 Server v0.13: pid=24955 started with processes: 8
2017/09/25 10:55:22 Using config from: '/home/me/go/src/github.com/tinode/chat/server/tinode.conf'
2017/09/25 10:55:22 Running as a standalone server.
2017/09/25 10:55:22 Serving static content from '/home/me/Desktop/example-react-js'
2017/09/25 10:55:22 Listening for client HTTP connections on [:6060]

Any idea why this error happens?

or-else commented 7 years ago

Hi,

Static files are mounted at the /x/, i.e. the correct path is http://localhost:6060/x/

I'll make it more clear in the docs.

Thanks!

k0fi commented 7 years ago

Thanks for the tip, but I still get 404:

GET http://127.0.0.1:6060/x/example-react-js/ 404 (Not Found) or:

GET http://localhost:6060/x/example-react-js/ 404 (Not Found)

While the server is running:

me@pc:~/go$ /home/me/go/bin/server -config=/home/me/go/src/github.com/tinode/chat/server/tinode.conf -static_data=/home/me/Desktop/example-react-js/
2017/09/25 18:39:36 Server v0.13: pid=9248 started with processes: 8
2017/09/25 18:39:36 Using config from: '/home/me/go/src/github.com/tinode/chat/server/tinode.conf'
2017/09/25 18:39:36 Running as a standalone server.
2017/09/25 18:39:36 Serving static content from '/home/me/Desktop/example-react-js/'
2017/09/25 18:39:36 Listening for client HTTP connections on [:6060]

What could be wrong in my installation?

or-else commented 7 years ago

Sorry, you responded too quickly :) The correct path is http://127.0.0.1:6060/x/