fix(server): some changes
This commit is contained in:
parent
90c72f7ffe
commit
cb40559e49
2 changed files with 5 additions and 6 deletions
|
@ -12,9 +12,9 @@ const prismaRun = require('../scripts/prisma-run');
|
||||||
const readConfig = require('../src/lib/readConfig');
|
const readConfig = require('../src/lib/readConfig');
|
||||||
const mimes = require('../scripts/mimes');
|
const mimes = require('../scripts/mimes');
|
||||||
const deployDb = require('../scripts/deploy-db');
|
const deployDb = require('../scripts/deploy-db');
|
||||||
|
const { version } = require('../package.json');
|
||||||
|
|
||||||
|
Logger.get('server').info(`starting zipline@${version} server`);
|
||||||
Logger.get('server').info('starting zipline server');
|
|
||||||
|
|
||||||
const dev = process.env.NODE_ENV === 'development';
|
const dev = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
|
@ -42,10 +42,11 @@ function shouldUseYarn() {
|
||||||
Logger.get('database').info('some migrations are not applied, applying them now...');
|
Logger.get('database').info('some migrations are not applied, applying them now...');
|
||||||
await deployDb(config);
|
await deployDb(config);
|
||||||
Logger.get('database').info('finished applying migrations');
|
Logger.get('database').info('finished applying migrations');
|
||||||
|
} else {
|
||||||
|
Logger.get('database').info('migrations up to date');
|
||||||
}
|
}
|
||||||
process.env.DATABASE_URL = config.core.database_url;
|
process.env.DATABASE_URL = config.core.database_url;
|
||||||
|
|
||||||
// await stat('./.next');
|
|
||||||
await mkdir(config.uploader.directory, { recursive: true });
|
await mkdir(config.uploader.directory, { recursive: true });
|
||||||
|
|
||||||
const app = next({
|
const app = next({
|
||||||
|
@ -55,6 +56,7 @@ function shouldUseYarn() {
|
||||||
}, config.core.port, config.core.host);
|
}, config.core.port, config.core.host);
|
||||||
|
|
||||||
await app.prepare();
|
await app.prepare();
|
||||||
|
await stat('./.next');
|
||||||
|
|
||||||
const handle = app.getRequestHandler();
|
const handle = app.getRequestHandler();
|
||||||
const prisma = new PrismaClient();
|
const prisma = new PrismaClient();
|
||||||
|
|
|
@ -19,9 +19,6 @@ export interface ConfigUploader {
|
||||||
// The route uploads will be served on
|
// The route uploads will be served on
|
||||||
route: string;
|
route: string;
|
||||||
|
|
||||||
// The route embedded routes will be served on
|
|
||||||
embed_route: string;
|
|
||||||
|
|
||||||
// Length of random chars to generate for file names
|
// Length of random chars to generate for file names
|
||||||
length: number;
|
length: number;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue