-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
126 additions
and
179 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,12 @@ | ||
import 'reflect-metadata'; | ||
import { ArtusApplication, ArtusInjectEnum, Scanner } from '@artus/core'; | ||
|
||
export async function start(options: any = {}) { | ||
const scanner = new Scanner({ | ||
needWriteFile: false, | ||
configDir: 'config', | ||
extensions: ['.ts'], | ||
framework: options.framework || { path: __dirname }, | ||
exclude: options.exclude || ['bin', 'test', 'coverage', 'src'] | ||
import path from 'path'; | ||
import { Application } from '@artusx/utils'; | ||
|
||
export async function start(options?: any) { | ||
const app = await Application.start({ | ||
...options, | ||
root: path.resolve(__dirname), | ||
configDir: 'config' | ||
}); | ||
|
||
const baseDir = options.baseDir || process.cwd(); | ||
const manifest = await scanner.scan(baseDir); | ||
|
||
const artusEnv = options.artusEnv || 'default'; | ||
const app = new ArtusApplication({ | ||
env: 'default', | ||
containerName: ArtusInjectEnum.DefaultContainerName | ||
}); | ||
await app.load(manifest[artusEnv], baseDir); | ||
|
||
await app.run(); | ||
|
||
return app; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
export default { | ||
framework: { | ||
package: '@artusx/core' | ||
} | ||
}; | ||
export default {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
export default { | ||
redis: { | ||
enable: false | ||
}, | ||
sequelize: { | ||
enable: false | ||
artusx: { | ||
enable: true, | ||
package: '@artusx/core' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from '@artusx/core/lib/types'; |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.