mirror of
https://github.com/immich-app/immich.git
synced 2025-11-17 00:32:37 +09:00
24 lines
657 B
JavaScript
24 lines
657 B
JavaScript
#!/usr/bin/env node
|
|
process.env.DB_URL = 'postgres://postgres:postgres@localhost:5432/immich';
|
|
import { NestFactory } from '@nestjs/core';
|
|
import { NestExpressApplication } from '@nestjs/platform-express';
|
|
import { ApiModule } from 'src/app.module';
|
|
import { useSwagger } from 'src/utils/misc';
|
|
|
|
const sync = async () => {
|
|
const app = await NestFactory.create<NestExpressApplication>(ApiModule, { preview: true });
|
|
useSwagger(app, true);
|
|
await app.close();
|
|
};
|
|
|
|
sync()
|
|
.then(() => {
|
|
console.log('Done');
|
|
process.exit(0);
|
|
})
|
|
.catch((error) => {
|
|
console.error(error);
|
|
console.log('Something went wrong');
|
|
process.exit(1);
|
|
});
|