Comparing version 0.13.2 to 0.13.3
{ | ||
"name": "mockyeah", | ||
"version": "0.13.2", | ||
"version": "0.13.3", | ||
"description": "An invaluable service mocking platform built on Express.", | ||
@@ -47,2 +47,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"cors": "^2.7.1", | ||
"express": "^4.13.3", | ||
@@ -49,0 +50,0 @@ "lodash": "^3.10.1", |
@@ -136,2 +136,26 @@ # mockyeah [![Build Status](https://travis-ci.org/ryanricard/mockyeah.svg)](https://travis-ci.org/ryanricard/mockyeah) | ||
### Configuration File | ||
`.mockyeah` default configurations | ||
```json | ||
{ | ||
"name": "mockyeah", | ||
"host": "localhost", | ||
"port": 4001, | ||
"fixturesDir": "./mockyeah/fixtures" | ||
} | ||
``` | ||
`name`: Used to identify the origin of logged output | ||
`host`: The host mockyeah will run on | ||
`port`: The port mockyeah will run on | ||
`fixturesDir`: The relative path to the fixtures directory | ||
Overriding any of these configurations can be done by placing a `.mockyeah` | ||
file in root of the project and adding the key value pair that needs to be updated. | ||
This file should be written using standard `JSON`. | ||
### Introductory tutorial | ||
@@ -170,3 +194,3 @@ 1. Create an example project and initialized with NPM | ||
```js | ||
const request = require('supertest')('http://localhost:4041'); | ||
const request = require('supertest')('http://localhost:4001'); | ||
const mockyeah = require('mockyeah'); | ||
@@ -173,0 +197,0 @@ |
@@ -5,2 +5,3 @@ 'use strict'; | ||
const prepareConfig = require('../lib/prepareConfig'); | ||
const cors = require('cors'); | ||
/** | ||
@@ -17,2 +18,5 @@ * Server module | ||
// Enable CORS for all routes | ||
app.use(cors()); | ||
// Start server on conigured hose and port | ||
@@ -19,0 +23,0 @@ const server = app.listen(config.port, config.host, function listen() { |
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
300422
55
999
257
6
+ Addedcors@^2.7.1
+ Addedcors@2.8.5(transitive)
+ Addedobject-assign@4.1.1(transitive)