Merge branch 'develop' into better-tutorial
This commit is contained in:
commit
0a22dae08c
|
|
@ -64,7 +64,7 @@ describe('api:notes/create', () => {
|
||||||
|
|
||||||
test('0 characters cw', () => {
|
test('0 characters cw', () => {
|
||||||
expect(v({ text: 'Body', cw: '' }))
|
expect(v({ text: 'Body', cw: '' }))
|
||||||
.toBe(VALID);
|
.toBe(INVALID);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('reject only cw', () => {
|
test('reject only cw', () => {
|
||||||
|
|
|
||||||
|
|
@ -253,8 +253,9 @@ export class ClientServerService {
|
||||||
decorateReply: false,
|
decorateReply: false,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
const port = (process.env.VITE_PORT ?? '5173');
|
||||||
fastify.register(fastifyProxy, {
|
fastify.register(fastifyProxy, {
|
||||||
upstream: 'http://localhost:5173', // TODO: port configuration
|
upstream: 'http://localhost:' + port,
|
||||||
prefix: '/vite',
|
prefix: '/vite',
|
||||||
rewritePrefix: '/vite',
|
rewritePrefix: '/vite',
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ import { execa } from 'execa';
|
||||||
const _filename = fileURLToPath(import.meta.url);
|
const _filename = fileURLToPath(import.meta.url);
|
||||||
const _dirname = dirname(_filename);
|
const _dirname = dirname(_filename);
|
||||||
|
|
||||||
|
const vitePort = process.env.VITE_PORT ? ["--strictPort", "--port", process.env.VITE_PORT] : ["--strictPort"];
|
||||||
|
|
||||||
await execa('pnpm', ['clean'], {
|
await execa('pnpm', ['clean'], {
|
||||||
cwd: _dirname + '/../',
|
cwd: _dirname + '/../',
|
||||||
stdout: process.stdout,
|
stdout: process.stdout,
|
||||||
|
|
@ -41,7 +43,7 @@ execa('pnpm', ['--filter', 'backend', 'watch'], {
|
||||||
stderr: process.stderr,
|
stderr: process.stderr,
|
||||||
});
|
});
|
||||||
|
|
||||||
execa('pnpm', ['--filter', 'frontend', 'watch'], {
|
execa('pnpm', ['--filter', 'frontend', 'watch', ...vitePort], {
|
||||||
cwd: _dirname + '/../',
|
cwd: _dirname + '/../',
|
||||||
stdout: process.stdout,
|
stdout: process.stdout,
|
||||||
stderr: process.stderr,
|
stderr: process.stderr,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue