It crashes when connet without tablename
It works, but not as long.
When i go to http://192.168.50.44:8000/posts/1, i see correct output:
[{"id":1,"title":"testtitle","content":"Testcontent","created":"0000-00-00"}]
But when i go to http://192.168.50.44:8000/posts/, i cant see tablenames, i see just
[]
But when i go to http://192.168.50.44:8000, it crashes:
/mysql/lib/protocol/Parser.js:80
throw err; // Rethrow non-MySQL errors
^
TypeError: First argument must be a string or Buffer
at ServerResponse.end (_http_outgoing.js:739:13)
at Query.
when i go to http://192.168.50.44:8000/posts/
Can you try: http://192.168.50.44:8000/posts (without trailing slash)?
when you go to http://192.168.50.44:8000
The behavior is undefined for that case.
when i go to http://192.168.50.44:8000/posts/
Can you try: http://192.168.50.44:8000/posts (without trailing slash)?
when you go to http://192.168.50.44:8000
The behavior is undefined for that case.
The result is the same without trailing slash and with trailing slash - it show "[]". When i go to go to http://192.168.50.44:8000 why it is crashes?
when i go to http://192.168.50.44:8000/posts/
Can you try: http://192.168.50.44:8000/posts (without trailing slash)?
when you go to http://192.168.50.44:8000
The behavior is undefined for that case.
How i can to define the behavior in this case? Can you help me? I am new in coding.