json-server icon indicating copy to clipboard operation
json-server copied to clipboard

`_like` doesn't work anymore?

Open mentor-27 opened this issue 1 year ago • 4 comments

Is there any other way to implement filtering by some value if it matches the query phrase? http://localhost:3000/posts?title_like=searchPhrase responds empty array but there are many matches in fact

mentor-27 avatar May 29 '24 04:05 mentor-27

Version 1.0.0 beta. 1 does not support this feature, please use version 0.17.0

eobeans avatar Jul 04 '24 03:07 eobeans

@eobeans Is there some sort of workaround in 1.0.0? Or is it planned?

johnlindquist avatar Sep 20 '24 17:09 johnlindquist

+1

BigSamu avatar Dec 05 '24 12:12 BigSamu

+1

I am following a tutorial where some of the older features of json-server is used e.g. the search.

Here is what I did:

To install the v0.17.0 release of json-server and remove any existing version, follow these steps:

Uninstall the existing version of json-server:

npm uninstall -g json-server

Install the v0.17.0 version of json-server:

npm install -g [email protected]

These commands will uninstall any globally installed version of json-server and then install the v0.17.0 release globally.

The release page for v0.17.0 of json-server:

https://github.com/typicode/json-server/releases/tag/v0.17.0

Be aware of changes like how to start the server:

% json-server data/db.json --port 8000 -> % json-server --watch data/db.json --port 8000

larhou avatar Jan 05 '25 08:01 larhou