Compare commits

...

6 Commits

Author SHA1 Message Date
d160a92bee 2.0.44 2023-03-30 19:44:44 +02:00
cc421c3321 fix(core): update 2023-03-30 19:44:44 +02:00
92ecef30d3 2.0.43 2023-03-30 19:42:55 +02:00
de4aab6df0 fix(core): update 2023-03-30 19:42:55 +02:00
5624e9dc1f 2.0.42 2023-03-30 19:40:41 +02:00
c7e40e4cde fix(core): update 2023-03-30 19:40:41 +02:00
4 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@apiglobal/typedserver",
"version": "2.0.41",
"version": "2.0.44",
"description": "easy serving of static files",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiglobal/typedserver',
version: '2.0.41',
version: '2.0.44',
description: 'easy serving of static files'
}

View File

@ -72,17 +72,17 @@ export class TypedServer {
public ended = false;
constructor(optionsArg: IServerOptions) {
const standardOptions: IServerOptions = {
injectReload: true,
port: 3000,
serveDir: process.cwd(),
watch: true,
injectReload: false,
serveDir: null,
watch: false,
cors: true,
};
this.options = {
...standardOptions,
...optionsArg,
};
this.server = new servertools.Server(this.options);
// add routes to the smartexpress instance
this.server.addRoute(
@ -201,7 +201,9 @@ export class TypedServer {
this.ended = true;
await this.server.stop();
await this.typedsocket.stop();
await this.smartchokInstance.stop();
if (this.smartchokInstance) {
await this.smartchokInstance.stop();
}
}
public async createServeDirHash() {

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiglobal/typedserver',
version: '2.0.41',
version: '2.0.44',
description: 'easy serving of static files'
}