modern-mirror
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,2 @@ | ||
#!/usr/bin/env node | ||
const express = require('express'); | ||
@@ -15,2 +16,7 @@ const app = express(); | ||
glob(matchPath, (err, files) =>{ | ||
if(files.length == 0){ | ||
console.log(`Couldn't find any matching file at ${matchPath}`); | ||
res.status(404).send(); | ||
return; | ||
} | ||
err ? sendErr(res, err) : processFile(res, files[0]); | ||
@@ -17,0 +23,0 @@ }) |
{ | ||
"name": "modern-mirror", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A simple server that makes mocking production servers more feasible", | ||
@@ -20,3 +20,11 @@ "main": "index.js", | ||
}, | ||
"postinstall": "mkdir ~/modern-mirror-routes" | ||
"postinstall": "mkdir ~/modern-mirror-routes", | ||
"keywords": [ | ||
"server", | ||
"mock", | ||
"testing" | ||
], | ||
"bin": { | ||
"modern-mirror": "./index.js" | ||
} | ||
} |
@@ -18,3 +18,3 @@ # Modern Mirror | ||
- Place a file titled `test.json` in the `~/modern-mirror-routes/` directory or whatever directory you specified with `-d`/`--route-directory` | ||
- Make any kind of request (Magic Mirror doesn't care if it is a GET, POST, PUT, etc.) to `localhost:3000/test` | ||
- Make any kind of request (Modern Mirror doesn't care if it is a GET, POST, PUT, etc.) to `localhost:3000/test` | ||
- The response should be the contents of the `test.json` file you created earlier | ||
@@ -21,0 +21,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4089
44