Open nillwyc opened 6 months ago
Well, .js
files are not supported anymore as a source for database generation, as it comes from
Obviously, json-server expects only .json5
and .json
files, these changes have been made in PR https://github.com/typicode/json-server/pull/1468. However you can install latest >= 0.X.X
version (0.17.4
as for today), where .js
still can be used:
Looks like you also want to generate data - I also had the same task, and I solved it by creating.json
file with Node.js script and then using this file as a source for json-server: https://gitverse.ru/austin_s/react-interview-task-v3/content/main/server/index.cjs
it doesn't work on xxx.js or remote url,though xxx.json is ok
does anyone have the same problem as mine?
my Node.js:v18.19.0
this is a .js file in my work folder.
i tested these codes which copied on
https://github.com/typicode/json-server/tree/v0
but something wrong