mirror of https://github.com/immich-app/immich.git
parent
a5e8b451b2
commit
e7aa50425c
@ -1,9 +0,0 @@
|
||||
const spec = require('../immich-openapi-specs.json');
|
||||
const pkg = require('../../server/package.json');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
spec.info.version = pkg.version;
|
||||
fs.writeFileSync(
|
||||
path.join(__dirname, '../immich-openapi-specs.json'),
|
||||
JSON.stringify(spec, null, 2)
|
||||
);
|
||||
@ -0,0 +1,23 @@
|
||||
#!/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);
|
||||
});
|
||||
Loading…
Reference in New Issue