File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed
test/fixtures/simple-app/server Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,13 @@ module.exports = function(app, options) {
38
38
migrationModelSettings . acls = migrationMapModelSettings . acls = options . acls ;
39
39
}
40
40
41
+ // Support for loopback 2.x.
42
+ if ( app . loopback . version . startsWith ( 2 ) ) {
43
+ Object . keys ( migrationModelSettings . methods ) . forEach ( key => {
44
+ migrationModelSettings . methods [ key ] . isStatic = true ;
45
+ } ) ;
46
+ }
47
+
41
48
debug ( 'Creating Migration model using settings: %o' , migrationModelSettings ) ;
42
49
var MigrationModel = dataSource . createModel (
43
50
migrationDef . name ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ var debug = require('debug')('loopback-component-migrate');
4
4
var path = require ( 'path' ) ;
5
5
var fs = require ( 'fs' ) ;
6
6
var assert = require ( 'assert' ) ;
7
- var utils = require ( 'loopback-datasource-juggler /lib/utils' ) ;
7
+ var utils = require ( 'loopback/lib/utils' ) ;
8
8
var util = require ( 'util' ) ;
9
9
10
10
module . exports = function ( Migration , options ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"restApiRoot" : " /api" ,
3
- "host" : " localhost " ,
3
+ "host" : " 0.0.0.0 " ,
4
4
"port" : 3000 ,
5
+ "remoting" : {
6
+ "context" : false ,
7
+ "rest" : {
8
+ "normalizeHttpPath" : false ,
9
+ "xml" : false
10
+ },
11
+ "json" : {
12
+ "strict" : false ,
13
+ "limit" : " 100kb"
14
+ },
15
+ "urlencoded" : {
16
+ "extended" : true ,
17
+ "limit" : " 100kb"
18
+ },
19
+ "cors" : false
20
+ },
5
21
"legacyExplorer" : false
6
22
}
You can’t perform that action at this time.
0 commit comments