Skip to content

Commit

Permalink
chore: release new version
Browse files Browse the repository at this point in the history
  • Loading branch information
mdasberg committed Nov 10, 2023
1 parent 4975a3c commit f8be087
Show file tree
Hide file tree
Showing 4 changed files with 336 additions and 334 deletions.
1 change: 1 addition & 0 deletions example/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ services:
volumes:
- ./mocks:/opt/ngapimock/mocks
- ./extension.js:/opt/ngapimock/extension.js
- ./configuration.json:/opt/ngapimock/configuration.json
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ng-apimock/docker",
"description": "Standalone setup for @ng-apimock/core",
"version": "1.1.0",
"version": "3.0.0",
"homepage": "https://github.com/ng-apimock/docker#readme",
"author": {
"name": "Mischa Dasberg",
Expand Down Expand Up @@ -29,12 +29,12 @@
"api"
],
"dependencies": {
"@ng-apimock/core": "3.4.0",
"@ng-apimock/dev-interface": "3.1.0",
"express": "4.17.1"
"@ng-apimock/core": "3.11.0",
"@ng-apimock/dev-interface": "3.2.1",
"express": "4.18.2"
},
"devDependencies": {
"fs-extra": "10.0.0",
"http-proxy-middleware": "2.0.1"
"fs-extra": "11.1.1",
"http-proxy-middleware": "2.0.6"
}
}
8 changes: 7 additions & 1 deletion serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ const app = express();
app.set('port', 3000);

// Process the test application mocks
apimock.processor.process({src: 'mocks', watch: true});
if(fs.existsSync(path.join(process.cwd(), 'configuration.json'))) {
const configuration = require(path.join(process.cwd(), 'configuration.json'));
apimock.processor.process(configuration);
} else {
const configuration = {src: 'mocks', watch: true};
apimock.processor.process(configuration);
}

app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
Expand Down
Loading

0 comments on commit f8be087

Please sign in to comment.