feat: respect context in server
This commit is contained in:
parent
06049169a2
commit
f5436f5ee3
32 changed files with 359 additions and 204 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import { createRequestHandler } from 'react-router'
|
||||
import { access, constants } from 'node:fs/promises';
|
||||
import { constants, access } from 'node:fs/promises';
|
||||
import { join, resolve } from 'node:path';
|
||||
import log from '~server/log';
|
||||
import { createRequestHandler } from 'react-router';
|
||||
import log from '~server/utils/log';
|
||||
|
||||
export default async function() {
|
||||
export default async function () {
|
||||
const buildPath = process.env.BUILD_PATH ?? './build';
|
||||
const server = resolve(join(buildPath, 'server'));
|
||||
|
||||
|
|
@ -12,7 +12,10 @@ export default async function() {
|
|||
log.info('SRVX', 'Using build directory %s', resolve(buildPath));
|
||||
} catch (error) {
|
||||
log.error('SRVX', 'No build found. Please refer to the documentation');
|
||||
log.error('SRVX', 'https://github.com/tale/headplane/blob/main/docs/integration/Native.md');
|
||||
log.error(
|
||||
'SRVX',
|
||||
'https://github.com/tale/headplane/blob/main/docs/integration/Native.md',
|
||||
);
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue