Skip to content

Commit 40e247f

Browse files
author
Fuss Florian (uid10804)
committed
refactor(server): move examples to source folder to fit to tsconfig and dev settings
1 parent a950a86 commit 40e247f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/server/example/advanced.ts renamed to packages/server/src/example/advanced.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import {
66
CoreApp,
77
FileStorageAdapter,
88
Environment,
9-
} from '../src/index';
10-
import { AuthStrategy } from '../src/auth/auth.strategy';
11-
import { ApiKeyStrategy } from '../src/auth/apikey.strategy';
12-
import { PublicStrategy } from '../src/auth/public.strategy';
9+
} from '../index';
10+
import { AuthStrategy } from '../auth/auth.strategy';
11+
import { ApiKeyStrategy } from '../auth/apikey.strategy';
12+
import { PublicStrategy } from '../auth/public.strategy';
1313

1414
const server = express();
1515
const appConfig = new AppConfig();

packages/server/example/simple.ts renamed to packages/server/src/example/simple.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import {
77
PublicStrategy,
88
Swagger,
99
SwaggerConfig,
10-
} from '../src/index';
11-
10+
} from '../index';
1211
const server = express();
1312
const appConfig = new AppConfig();
1413
const environment = new Environment();
@@ -22,7 +21,7 @@ const swagger = new Swagger(
2221
appConfig.routes.swaggerSpecRoutePath
2322
);
2423

25-
let core = new CoreApp(
24+
const core = new CoreApp(
2625
appConfig,
2726
server,
2827
new FileStorageAdapter('db.json'),
@@ -36,6 +35,7 @@ const init = async () => {
3635
console.log(
3736
'JSON Server is running under port 3000. Use http://localhost:3000/ to access it'
3837
);
38+
3939
server.listen(3000);
4040
};
4141
init();

0 commit comments

Comments
 (0)