change files structure
This commit is contained in:
parent
3210e72b22
commit
1ed6449ac6
30 changed files with 7 additions and 7 deletions
45
server/src/core/di/env.ts
Normal file
45
server/src/core/di/env.ts
Normal file
|
@ -0,0 +1,45 @@
|
|||
import { reflection } from "first-di";
|
||||
|
||||
@reflection
|
||||
export class IEnv{
|
||||
rootFolder!: string;
|
||||
constructor(){
|
||||
|
||||
}
|
||||
toStringEnv(){
|
||||
return ''
|
||||
}
|
||||
static env(){
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
@reflection
|
||||
export class DevEnv implements IEnv {
|
||||
rootFolder:string;
|
||||
constructor(rootFolder:string){
|
||||
this.rootFolder = rootFolder
|
||||
}
|
||||
toStringEnv(): string {
|
||||
return DevEnv.env()
|
||||
}
|
||||
static env(){
|
||||
return 'DevEnv'
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@reflection
|
||||
export class UnitTestEnv implements IEnv{
|
||||
rootFolder:string;
|
||||
constructor(rootFolder:string){
|
||||
this.rootFolder = rootFolder
|
||||
}
|
||||
toStringEnv(): string {
|
||||
return UnitTestEnv.env()
|
||||
}
|
||||
static env(){
|
||||
return 'UnitTestEnv'
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue