Moved to interface and create real enum type
parent
3f49d880c8
commit
f1c284915e
|
|
@ -14,7 +14,7 @@
|
|||
"@nestjs/platform-express": "^10.0.0",
|
||||
"@nestjs/platform-socket.io": "^10.4.7",
|
||||
"@nestjs/websockets": "^10.4.7",
|
||||
"common_logic": "file:../common_logic",
|
||||
"interface": "file:../interface",
|
||||
"reflect-metadata": "^0.2.0",
|
||||
"rxjs": "^7.8.1"
|
||||
},
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
"typescript": "^5.1.3"
|
||||
}
|
||||
},
|
||||
"../common_logic": {
|
||||
"../interface": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
|
|
@ -3549,10 +3549,6 @@
|
|||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/common_logic": {
|
||||
"resolved": "../common_logic",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/component-emitter": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz",
|
||||
|
|
@ -5284,6 +5280,10 @@
|
|||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/interface": {
|
||||
"resolved": "../interface",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/ipaddr.js": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
"@nestjs/platform-express": "^10.0.0",
|
||||
"@nestjs/platform-socket.io": "^10.4.7",
|
||||
"@nestjs/websockets": "^10.4.7",
|
||||
"common_logic": "file:../common_logic",
|
||||
"interface": "file:../interface",
|
||||
"reflect-metadata": "^0.2.0",
|
||||
"rxjs": "^7.8.1"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule } from './app.module';
|
||||
import { printMsg } from 'common_logic';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
const port = process.env.PORT ?? 3010;
|
||||
await app.listen(port);
|
||||
printMsg(`App listening on port ${port}`);
|
||||
}
|
||||
bootstrap();
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
export function printMsg(msg: string){
|
||||
console.log(msg);
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
export enum TrackType {
|
||||
RAIL = "RAIL",
|
||||
ROAD = "ROAD"
|
||||
};
|
||||
|
|
@ -0,0 +1 @@
|
|||
export * from "./constants/TrackType"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "common_logic",
|
||||
"name": "interface",
|
||||
"version": "1.0.0",
|
||||
"description": "A collection of common functions for the trains and roads project.",
|
||||
"main": "dist/index.js",
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
"@types/node": "^16.18.119",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"common_logic": "file:../common_logic",
|
||||
"interface": "file:../interface",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-scripts": "5.0.1",
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
"web-vitals": "^2.1.4"
|
||||
}
|
||||
},
|
||||
"../common_logic": {
|
||||
"../interface": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
|
|
@ -6142,10 +6142,6 @@
|
|||
"node": ">= 12"
|
||||
}
|
||||
},
|
||||
"node_modules/common_logic": {
|
||||
"resolved": "../common_logic",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/common-tags": {
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz",
|
||||
|
|
@ -9667,6 +9663,10 @@
|
|||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interface": {
|
||||
"resolved": "../interface",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/internal-slot": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz",
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"@types/node": "^16.18.119",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"common_logic": "file:../common_logic",
|
||||
"interface": "file:../interface",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-scripts": "5.0.1",
|
||||
|
|
|
|||
Loading…
Reference in New Issue