I am trying to run json-server
npm in codesandbox. I have created a vanilla project and added a dependency to the package.json
. I have to run a script with json-server --watch db.json
.
Is there a way in codesandbox to run the script?
I am trying to run json-server
npm in codesandbox. I have created a vanilla project and added a dependency to the package.json
. I have to run a script with json-server --watch db.json
.
Is there a way in codesandbox to run the script?
You'll need to use a container sandbox like Node in order to be able to both run json-server and set your own scripts.
Here's more info on the different types of sandboxes available on CodeSandbox: https://codesandbox.io/docs/environment
Incidentally, we have a json-server template you might be interested in: https://codesandbox.io/s/json-server-1i5z0