mirror of
https://github.com/typicode/json-server.git
synced 2025-07-27 20:23:34 +08:00
Fixed the issue with watching under Win10 with Cygwin (#356)
This commit is contained in:
@ -168,7 +168,7 @@ module.exports = function (argv) {
|
||||
chokidar
|
||||
.watch(path.dirname(source))
|
||||
.on('change', function (file) {
|
||||
if (file === source) {
|
||||
if (path.resolve(file) === path.resolve(source)) {
|
||||
if (is.JSON(file)) {
|
||||
var obj = JSON.parse(fs.readFileSync(file))
|
||||
// Compare .json file content with in memory database
|
||||
|
Reference in New Issue
Block a user